Commit 50e621d2 by muhammad-ammar Committed by Ned Batchelder

Remove RemovedInDjango19Warning warnings

parent 589d2cf3
...@@ -33,7 +33,7 @@ def load_requirements(*requirements_paths): ...@@ -33,7 +33,7 @@ def load_requirements(*requirements_paths):
setup( setup(
name='edx-submissions', name='edx-submissions',
version='0.1.0', version='0.1.1',
author='edX', author='edX',
description='An API for creating submissions and scores.', description='An API for creating submissions and scores.',
url='http://github.com/edx/edx-submissions.git', url='http://github.com/edx/edx-submissions.git',
......
...@@ -65,6 +65,7 @@ class StudentItem(models.Model): ...@@ -65,6 +65,7 @@ class StudentItem(models.Model):
return u"({0.student_id}, {0.course_id}, {0.item_type}, {0.item_id})".format(self) return u"({0.student_id}, {0.course_id}, {0.item_type}, {0.item_id})".format(self)
class Meta: class Meta:
app_label = "submissions"
unique_together = ( unique_together = (
# For integrity reasons, and looking up all of a student's items # For integrity reasons, and looking up all of a student's items
("course_id", "student_id", "item_id"), ("course_id", "student_id", "item_id"),
...@@ -120,6 +121,7 @@ class Submission(models.Model): ...@@ -120,6 +121,7 @@ class Submission(models.Model):
return u"Submission {}".format(self.uuid) return u"Submission {}".format(self.uuid)
class Meta: class Meta:
app_label = "submissions"
ordering = ["-submitted_at", "-id"] ordering = ["-submitted_at", "-id"]
...@@ -140,6 +142,9 @@ class Score(models.Model): ...@@ -140,6 +142,9 @@ class Score(models.Model):
# Flag to indicate that this score should reset the current "highest" score # Flag to indicate that this score should reset the current "highest" score
reset = models.BooleanField(default=False) reset = models.BooleanField(default=False)
class Meta:
app_label = "submissions"
@property @property
def submission_uuid(self): def submission_uuid(self):
""" """
...@@ -233,6 +238,7 @@ class ScoreSummary(models.Model): ...@@ -233,6 +238,7 @@ class ScoreSummary(models.Model):
latest = models.ForeignKey(Score, related_name="+") latest = models.ForeignKey(Score, related_name="+")
class Meta: class Meta:
app_label = "submissions"
verbose_name_plural = "Score Summaries" verbose_name_plural = "Score Summaries"
@receiver(post_save, sender=Score) @receiver(post_save, sender=Score)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment