Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#11137 closed (fixed)

Typo in Proxy Model documentation (topics/db/models)

Reported by: Erik Karulf Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords: proxy model
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The documentation for proxy models in [source:django/trunk/docs/topics/db/models.txt docs/topics/db/models.txt] is inconsistent with [source:django/trunk/docs/topics/db/managers.txt docs/topics/db/managers.txt]. The models documentation is missing the declaration of django.db.models.Models for it's example class ExtraManagers.

[source:django/trunk/docs/topics/db/models.txt#10797 r10797]

# Create an abstract class for the new manager.
class ExtraManagers:
    secondary = NewManager()

    class Meta:
        abstract = True

class MyUser(User, ExtraManagers):
    class Meta:
        proxy = True

Proposed:

# Create an abstract class for the new manager.
class ExtraManagers(models.Model):
    secondary = NewManager()

    class Meta:
        abstract = True

class MyUser(User, ExtraManagers):
    class Meta:
        proxy = True

Attachments (1)

proxy-model.patch (470 bytes ) - added by Erik Karulf 15 years ago.
Proposed solution

Download all attachments as: .zip

Change History (4)

by Erik Karulf, 15 years ago

Attachment: proxy-model.patch added

Proposed solution

comment:1 by Alex Gaynor, 15 years ago

milestone: 1.1
Triage Stage: UnreviewedReady for checkin

comment:2 by Karen Tracey, 15 years ago

Resolution: fixed
Status: newclosed

(In [10818]) Fixed #11137 -- Add missing base class in proxy model extra managers doc. Thanks ekarulf.

comment:3 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top