Friday, December 30, 2011

sorting of foreign key elements


is there a way to change the order in which foreign key elements are
displayed in the admin interface?

I have got a model Currency that has a field currency_id:

currency_id = models.ForeignKey(CurrencyID)

("Currencies" are language-dependent ways of referring to currencies,
"CurrencyIDs" are language-independent objects.)

Although my CurrencyID objects are sorted alphabetically (Afghan
Afghani, Albanian Lek, Algerian Dinar, ...) they appear in reversed
order in the currency_id slot in the admin interface of Currency
objects (Zimbabwe Dollar, Zambian Kwacha, Yemeni Rial ...). Can I
change this? If so, how?


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment