0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed bugs in docs/model-api.txt

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2881 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-05-09 21:32:56 +00:00
parent 3248a28b20
commit 887131c749

View File

@ -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)