On Jun 7, 5:25 pm, rahul jain <jainwolver...@gmail.com> wrote: > Hi Daniel, > > New objects first on the filter display, but my filter is applied on > Charfield. > > So for ex: , I am creating like suppose x number of objects with a > field with value key_timestamp (charfield). > > Then I am creating a filter on the CharField. I am not sure how its > implementing it but its displaying (key_timetamp) in a reverse order > (I mean older to newest). I was expecting it to be a random order > since its a charfield. So I would like it to display newly created > key_timestamp first. So that I can get all the new objects with that > timestamp. > > --RJ >
You can always do: ordering = ('-mycharfield',) in the model's inner Meta class, or in the modeladmin class, although I still don't understand how it is being ordered by the timestamp when the 'key' element of the field is before that, but never mind. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.