Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#11137 closed (fixed)

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

Reported by: ekarulf Owned by: nobody
Component: Documentation Version: master
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: UI/UX:

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 ekarulf 6 years ago.
Proposed solution

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by ekarulf

Proposed solution

comment:1 Changed 6 years ago by Alex

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 6 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

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