Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#23282 closed Cleanup/optimization (fixed)

Change confusing text about "Inheritance and reverse relations"

Reported by: knowledgepoint-devs Owned by: nobody
Component: Documentation Version: master
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 timgraham 12 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 months ago by bmispelon

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization
  • Version changed from 1.4 to master

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)

Changed 12 months ago by timgraham

comment:2 Changed 12 months ago by timgraham

  • Has patch set

comment:3 Changed 12 months ago by claudep

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 12 months ago by Tim Graham <timograham@…>

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

In 700618706425ae15888b9e60bdc7a00dd0b32a2f:

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

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

comment:5 Changed 12 months ago by Tim Graham <timograham@…>

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 Changed 12 months ago by Tim Graham <timograham@…>

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