Skip to content

Instantly share code, notes, and snippets.

@mikeywaites
Created April 24, 2013 14:25
Show Gist options
  • Save mikeywaites/5452530 to your computer and use it in GitHub Desktop.
Save mikeywaites/5452530 to your computer and use it in GitHub Desktop.
class CustomQuerySet(QuerySet):
def latest(self):
return self.filter(foo=bar)
class Manager(models.Manager):
def get_query_set(self):
return CustomQuerySet()
def latest(self):
return self.get_query_set().latest()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment