Skip to content

Commit

Permalink
Typo with querysets
Browse files Browse the repository at this point in the history
  • Loading branch information
shabda committed Feb 21, 2012
1 parent 06e8989 commit e743d14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/models.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ do not want to display any object on your site which is unapproved(is_approved =
False in your Model).::

class ModelClassApprovedOnlyManager(models.Manager):
def get_query_set():
self.get_query_set().filter(is_approved = True)
def get_query_set(*args, **kwargs):
return super(ModelClassApprovedOnlyManager, self).get_query_set(*args, **kwargs).filter(is_approved = True)

class ModelClass(models.Model):
...
Expand Down

0 comments on commit e743d14

Please sign in to comment.