Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23282 closed Cleanup/optimization (fixed)

Change confusing text about "Inheritance and reverse relations"

Reported by: knowledgepoint-devs Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
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

https://docs.djangoproject.com/en/1.6/topics/db/models/#inheritance-and-reverse-relations says "If you are putting those types of relations on a subclass of another model".

I think it should read "If you are putting those types of relations on another subclass of the parent model"?

Attachments (1)

23282.diff (1.7 KB ) - added by Tim Graham 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Baptiste Mispelon, 10 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 1.4master

Even after reading it a few times, I still understand what the documentation is trying to tell me.

It also seems to me that the example chosen is wrong since the following models (taken straight from the documentation) validate fine on Django 1.6:

class Place(models.Model):
    name = models.CharField(max_length=50)
    address = models.CharField(max_length=80)

class Restaurant(Place):
    serves_hot_dogs = models.BooleanField()
    serves_pizza = models.BooleanField()

class Supplier(Place):
    # Notice the lack of a related_name
    customers = models.ManyToManyField(Restaurant)

by Tim Graham, 10 years ago

Attachment: 23282.diff added

comment:2 by Tim Graham, 10 years ago

Has patch: set

comment:3 by Claude Paroz, 10 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 700618706425ae15888b9e60bdc7a00dd0b32a2f:

Fixed #23282 -- Corrected inheritance and reverse relations example.

Thanks knowledgepoint-devs for the report and claudep for review.

comment:5 by Tim Graham <timograham@…>, 10 years ago

In 20e3a004ac88b127a51bb332ca2653fe06a19a97:

[1.7.x] Fixed #23282 -- Corrected inheritance and reverse relations example.

Thanks knowledgepoint-devs for the report and claudep for review.

Backport of 7006187064 from master

comment:6 by Tim Graham <timograham@…>, 10 years ago

In d1e4fb996bd969c9a5d1dc4546b3fd46766ad25e:

[1.6.x] Fixed #23282 -- Corrected inheritance and reverse relations example.

Thanks knowledgepoint-devs for the report and claudep for review.

Backport of 7006187064 from master

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