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
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
2 matches
Mail list logo