Re: Customize Admin Object elements

2007-10-31 Thread äL
I would like to do the same. But if I try class Meta: ordering = ['name'] the drop down menu is still ordered by ID and not by name. Because name is in an other model (foreign key). This is my code: ### CODE ### class Person(models.Model): nameLast = models.CharField ('Nachnam

Re: Customize Admin Object elements

2007-10-27 Thread Griffin Caprio
Gustaf, Awesome thanks. - Griffin On Oct 27, 2007, at 2:15 PM, [EMAIL PROTECTED] wrote: > > class MyModel(models.Model): > ... > > class Meta: > ordering = ['name'] > > /Gustaf > > On Oct 27, 8:07 pm, Griffin <[EMAIL PROTECTED]> wrote: >> Is there any way to customize the drop d

Re: Customize Admin Object elements

2007-10-27 Thread [EMAIL PROTECTED]
class MyModel(models.Model): ... class Meta: ordering = ['name'] /Gustaf On Oct 27, 8:07 pm, Griffin <[EMAIL PROTECTED]> wrote: > Is there any way to customize the drop down lists that appear when > editing an object in the admin interface? I would like to change the > order th

Customize Admin Object elements

2007-10-27 Thread Griffin
Is there any way to customize the drop down lists that appear when editing an object in the admin interface? I would like to change the order that elements appear. Instead of sorting by id, I would like to sort by another property such as name. I've already customized the Admin class within the