Re: Selecting only published Articles

2009-05-25 Thread googletorp
Article.objects.filter(pub_status=1) You should look at the queryset api on docs.djangoproject.com ~Jakob On May 25, 10:48 pm, Alex Jonsson wrote: > Hey! > > In my Article model I have a pub_status which can be either 0 (draft) > or 1 (published). How can I make sure

Selecting only published Articles

2009-05-25 Thread Alex Jonsson
Hey! In my Article model I have a pub_status which can be either 0 (draft) or 1 (published). How can I make sure that every time I try to fetch some Articles, no Articles with pub_status 0 comes along? I'm currently using a custom manager to enable Article.objects.published.all(), but that's