Friday, December 30, 2011

sorting of foreign key elements

Hello,

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?

Jaroslav

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment