On Feb 14, 12:55 am, Gour <g...@mail.inet.hr> wrote:
> Finally, I managed to add 'class Meta' as subclass of BlogPost class (as
> above), but I wonder if adding 'ordering = ('-timestamp',)' to
> BlogPostAdmin class is supposed to work or what is explanation if it
> should not work (as we experienced)?

ordering is an option in model Meta classes, but it's not an option in
ModelAdmin classes. Here are the lists of what you can use in each:
ModelAdmin: 
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-options
model Meta: http://docs.djangoproject.com/en/dev/ref/models/options/#ordering

While order is something that's handy to have in the admin, it's not
specific to it. It's a property of the model itself, since it ends up
in any QuerySet involving that model.

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

Reply via email to