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 <alex.e.jons...@gmail.com> 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 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 not very plugable when for > example using the django-tagging app. > > Any suggestions? > > Alex --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---