Skip to content
Snippets Groups Projects
Verified Commit b90b4515 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add ordering to models. Closes #54.

parent d67da8df
No related branches found
No related tags found
No related merge requests found
Subproject commit 5ff76246b7de192990f5ec3c18c8c42b751072aa
Subproject commit 51e723c85ec9694c6597a7dfdc4fce2930449819
Subproject commit 442d030f115f7f34863a2a4c764f7c31bdffa2ed
Subproject commit 674a8c43fc24cd75b2230aff856e40fed16a91a9
Subproject commit 7619dc0a7bf8f2ef61de148642006f7ac00e52bb
Subproject commit 97ca661b14b1c445c2f31f27901e759e55f6f124
......@@ -22,6 +22,10 @@ class School(models.Model):
'Official name of the school, e.g. as given by supervisory authority'))
class Meta:
ordering = ['name', 'name_official']
class Person(SchoolRelated):
""" A model describing any person related to a school, including, but not
limited to, students, teachers and guardians (parents).
......@@ -29,6 +33,7 @@ class Person(SchoolRelated):
class Meta:
unique_together = [['school', 'short_name'], ['school', 'import_ref']]
ordering = ['last_name', 'first_name']
SEX_CHOICES = [
('f', _('female')),
......@@ -118,6 +123,7 @@ class Group(SchoolRelated):
class Meta:
unique_together = [['school', 'name'], ['school', 'short_name']]
ordering = ['short_name', 'name']
name = models.CharField(verbose_name=_(
'Long name of group'), max_length=30)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment