diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-05-09 21:32:56 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-05-09 21:32:56 +0000 |
| commit | 887131c749d92eb87bee93cff950ea4fec484dc4 (patch) | |
| tree | b81ff2a911a33e9e0689faffc8aeed14e6211c68 /docs/model-api.txt | |
| parent | 3248a28b2088a728d63a0514df8a37835cd2b676 (diff) | |
Fixed bugs in docs/model-api.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2881 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/model-api.txt')
| -rw-r--r-- | docs/model-api.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt index 90afc84338..6d6249ee88 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -1413,7 +1413,7 @@ all objects, and one that returns only the books by Roald Dahl:: # First, define the Manager subclass. class DahlBookManager(models.Manager): def get_query_set(self): - return super(Manager, self).get_query_set().filter(author='Roald Dahl') + return super(DahlBookManager, self).get_query_set().filter(author='Roald Dahl') # Then hook it into the Book model explicitly. class Book(models.Model): @@ -1444,11 +1444,11 @@ For example:: class MaleManager(models.Manager): def get_query_set(self): - return super(Manager, self).get_query_set().filter(sex='M') + return super(MaleManager, self).get_query_set().filter(sex='M') class FemaleManager(models.Manager): def get_query_set(self): - return super(Manager, self).get_query_set().filter(sex='F') + return super(FemaleManager, self).get_query_set().filter(sex='F') class Person(models.Model): first_name = models.CharField(maxlength=50) |
