I'm having trouble understanding the filtering.

I've queried all articles related to a particular artist:

articles = artist.article_set.all()

I want to list the articles by type, so I filter the queryset by type:

news = articles.filter(article_type__name__exact='news')
reviews = articles.filter(article_type__name__exact='review')
playlists = articles.filter(article_type__name__exact='playlist')
features = articles.filter(article__type__name__exact='feature')

The news articles list correctly, but none of the other article types come up.



I don't mind reading the instructions. I've been reading the database
API and looking at tutorials, but I'm not having much success figuring
out the problem.

Two questions: First, is there a way to output all of the SQL and
returned query sets so I can get a better idea of what's going on?
Second, are there any tutorials that directly address this type of
filtering?



Thanks,
-- 
Austin Govella
Thinking & Making: IA, UX, and IxD
http://thinkingandmaking.com
[EMAIL PROTECTED]

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

Reply via email to