How to change ordering in foreign key fields in django admin change_form
I have two tables, tasks and projects. And every task has a project (and every project can have N tasks).
When adding or editing a task, projects are displayed as dropdown as it should, but dropdown is ordered by ID (or no ordering at all). Because i start to have plenty of projects, is there a way to get projects in a dropdown in 开发者_如何学编程alphabetical order?
The objects should be ordered according to the default ordering specified on their model!
精彩评论