For instance, I have two objects:
1) Blog
2) Entry with a ForeignKey to Blog, and a Date field titled DateAdded

Now, I want to list all my blogs, ordering by the most recent added
entry.

I tried:
blog.objects.all().sort_by('entry__dateAdded').distinct()

But the result was that is a given blog had more than 1 entry, then it
shows up in the resulting queryset more than once. It appears distinct
() is doing nothing in this case.

are more knowledgeable minds willing to share their insight on this
problem?

Thanks!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to