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
|
@ -27,12 +27,16 @@ class Speaker(models.Model):
|
|||
editable = False
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
|
||||
def __unicode__(self):
|
||||
if self.user:
|
||||
return self.name
|
||||
else:
|
||||
return "?"
|
||||
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("speaker_edit")
|
||||
|
||||
|
|
Loading…
Reference in a new issue