I have two models, Artist and Album. I am able to add new albums via
the admin interface but the list of artists in the album edit / add
pages are not ordered.
If I am not getting the documentation wrong, this should be achieved
simply by stating the default ordering in the meta class. My
(simplified) models are as follows:
class Artist(models.Model):
name = models.CharField(maxlength = 100, core = True)
class META:
ordering = ['name']
class Admin:
list_display = ['name']
class Album(models.Model):
title = models.CharField(maxlength = 100, core = True)
artist = models.ForeignKey(Artist)
class Admin:
pass
The artist list appears as a multiple select box as it should be, but
it is not ordered.
Thanks for any help...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---