Is there an option in the django admin view for ordering of foreign key fields? i.e. I have a foreign key to a \"School\" model, which shows as a dropdown, sorted on pk-- I woul
It seems to work to add an admin class to the model admin, with the ordering equal to the field you want the drop down list sorted by.
# in the admin.py file
class SchoolAdmin(admin.ModelAdmin):
ordering = ['school_name']
admin.site.register(SchoolModel, SchoolAdmin)
This works if you are willing to have an edit/add option next to drop down list.