fixed get_published_list method

This commit is contained in:
Sanj 2011-07-10 05:14:42 +05:30
parent 4ab6761abd
commit 53f7781c16

View File

@ -260,7 +260,7 @@ class Article(models.Model):
def get_published_list(kls, user, qset=False): def get_published_list(kls, user, qset=False):
if not qset: if not qset:
qset = kls.objects.all() qset = kls.objects.all()
return qset.filter(published=True).exclude(Q(owner=user) | Q(users=user)).exclude(name__istartswith="template") return qset.filter(published=True).exclude(owner=user).exclude(users=user).exclude(name__istartswith="template")
@classmethod @classmethod
def get_template_list(kls): def get_template_list(kls):