is_anonymous

This commit is contained in:
j 2011-01-11 17:25:43 +05:30
parent 83acfd78fc
commit d2b0c18001

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