Hello.

Does anyone have an idea how to create a specific sort order for a
select box that represents a foreign key field in a django admin
change form.

For example, when adding a new "book" object via the django admin
change form, one may see "Name", "Author", and "Category" inputs. The
"Category" input is a select box, filled with data from a foreign key
that maps to a table named "categories".

The problem with my form is that the list of categories in the select
box are not ordered by name (perhaps they are ordered by the primary
key -- I'm not sure). I've played with the ordering() method but that
only seems to work in my custom pages, not the admin form.

Any help is appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to