Skip to content

Commit

Permalink
add get_subclass method
Browse files Browse the repository at this point in the history
  • Loading branch information
smacker committed Oct 26, 2011
1 parent a518621 commit 9ac5877
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ HGREV
.coverage
.tox/
Django-*.egg
*.pyc
3 changes: 3 additions & 0 deletions model_utils/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def get_query_set(self):
def select_subclasses(self, *subclasses):
return self.get_query_set().select_subclasses(*subclasses)

def get_subclass(self, *args, **kwargs):
return self.get_query_set().select_subclasses().get(*args, **kwargs)


class InheritanceCastMixin(object):
def cast(self):
Expand Down

0 comments on commit 9ac5877

Please sign in to comment.