Malcolm Tredinnick wrote: > > On Sun, 2008-04-27 at 23:19 -0500, Carl Karsten wrote: > [...] >> order_by('parent_id') doesn't do anything for the Admin UI, which is where I >> 'need' this. > > I made a typo. It should be 'parent__id' there (double underscore). > You're manually telling Django to order by one level, using the parent's > primary key.
Bingo. And this does the trick: class Meta: ordering = ('parent__id', 'order',) Thanks, Carl K --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---