Here's a (very) simplified version of my models:
laboratory/models.py
class Lab(Model):
professor = ForeignKey('authors.Author')
authors/models.py
class Author(Model):
name = CharField(max_length=100)
In the Django admin, when I add or update a Lab, a drop-down list containing each professors is automatically generated and displayed. The problem is this list is very long and it is not alphabetically ordered. I want the professor drop-down list to be alphabetically ordered by "name" field.
How can I do that?

所有评论(0)