Created
April 24, 2013 14:25
-
-
Save mikeywaites/5452530 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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