added Meta class ordering by name to order speaker lists and dropdowns
This commit is contained in:
parent
f1b37c9833
commit
40b04240d4
1 changed files with 4 additions and 0 deletions
|
@ -26,12 +26,16 @@ class Speaker(models.Model):
|
||||||
default = datetime.datetime.now,
|
default = datetime.datetime.now,
|
||||||
editable = False
|
editable = False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ['name']
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
if self.user:
|
if self.user:
|
||||||
return self.name
|
return self.name
|
||||||
else:
|
else:
|
||||||
return "?"
|
return "?"
|
||||||
|
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse("speaker_edit")
|
return reverse("speaker_edit")
|
||||||
|
|
Loading…
Reference in a new issue