is_anonymous

This commit is contained in:
j 2011-01-11 17:25:43 +05:30
parent a22cf8979f
commit 9f5e58b0c9

View file

@ -134,5 +134,8 @@ class ListManager(Manager):
if conditions:
qs = qs.filter(conditions)
qs = qs.filter(Q(status='public') | Q(status='featured') | Q(user=user))
if user.is_anonymous:
qs = qs.filter(Q(status='public') | Q(status='featured'))
else:
qs = qs.filter(Q(status='public') | Q(status='featured') | Q(user=user))
return qs