Thank you Malcom. Could you tell me: when the functionality is available, do you know what the steps to create the sort order will be?
On Dec 17, 7:38 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-12-16 at 17:42 -0800,borntonetworkwrote: > > 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. > > I think the situation at the moment is that what you're after isn't > easily achievable on trunk. In the near future this will be possible, > though (it's fixed on the queryset-refactor branch). The default > ordering on a related model will be used to order the results returned > for that model (and cross-model ordering will be easier, too). This > isn't ready for use yet, but it's something to look forwards to. > > Regards, > Malcolm > > -- > If it walks out of your refrigerator, LET IT > GO!!http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

