X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/45aa64ba1452c23a48a17d4f1a77a06f1124066a..12313cd815102f970c09afc1999d26cec8d99d5c:/curriculum/models.py diff --git a/curriculum/models.py b/curriculum/models.py index 4153f1b..314fa1f 100644 --- a/curriculum/models.py +++ b/curriculum/models.py @@ -192,13 +192,14 @@ class Curriculum(models.Model): """Official curriculum.""" TYPES = {'c': u'Cele kształcenia', 't': u'Treści nauczania'} - identifier = models.CharField(max_length=255, db_index=True) + identifier = models.CharField(max_length=255, db_index=True, unique=True) title = models.CharField(max_length=255) course = models.ForeignKey(CurriculumCourse) level = models.ForeignKey(CurriculumLevel) type = models.CharField(max_length=16, choices=TYPES.items()) class Meta: + ordering = ['identifier'] verbose_name = _("curriculum item") verbose_name_plural = _("curriculum items")