Commit 9267b254 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added ordering

parent 943d8a50
......@@ -16,6 +16,11 @@ class Major(TimeStampedModel):
def __str__(self):
def __unicode__(self):
return unicode(
class Meta:
ordering = ['name']
class StudentQuerySet(models.query.QuerySet):
def floor(self):
......@@ -114,5 +119,10 @@ class Student(TimeStampedModel):
def get_absolute_url(self):
return reverse('detail_student', kwargs={'slug':self.slug})
class Meta:
ordering = ['user']
def __str__(self): # __unicode__ on Python 2
return self.user.username
def __unicode__(self):
return unicode(self.user.username)
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