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
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
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
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
4 matches
Mail list logo