[Django] #21343: Restrictions imposed by intermediate many-to-many relationships should be mentioned in many-to-many reference docs

4 views
Skip to first unread message

Django

unread,
Oct 28, 2013, 9:25:37 AM10/28/13
to django-...@googlegroups.com
#21343: Restrictions imposed by intermediate many-to-many relationships should be
mentioned in many-to-many reference docs
-------------------------------------+-------------------------------------
Reporter: EvilDMP | Owner: nobody
Type: | Status: new
Uncategorized | Version: master
Component: | Keywords: afraid-to-commit
Documentation | Has patch: 0
Severity: Normal | Needs tests: 0
Triage Stage: | Easy pickings: 1
Unreviewed |
Needs documentation: 0 |
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-
many-to-many-relationships mentions that "you can’t use add, create, or
assignment (i.e., beatles.members = [...]) to create relationships" when
using intermediate models for many-to-many relationships with `through`,
but https://docs.djangoproject.com/en/dev/topics/db/examples/many_to_many/
doesn't, and should.

In the middle of the
https://docs.djangoproject.com/en/dev/topics/db/models/#intermediary-
manytomany section, there are notes about restrictions, and this probably
deserves a subheading of its own.

--
Ticket URL: <https://code.djangoproject.com/ticket/21343>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 28, 2013, 9:44:25 AM10/28/13
to django-...@googlegroups.com
#21343: Restrictions imposed by intermediate many-to-many relationships should be
mentioned in many-to-many reference docs
----------------------------------+--------------------------------------
Reporter: EvilDMP | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: afraid-to-commit | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by timo):

IMO, extra fields on M2M relationships is an advanced topic that doesn't
need to be mentioned in /topics/db/examples/many_to_many/ which seems more
beginner oriented. It's not clear to me what type note or link or
additional example your looking for here.

--
Ticket URL: <https://code.djangoproject.com/ticket/21343#comment:1>

Django

unread,
Oct 28, 2013, 10:07:19 AM10/28/13
to django-...@googlegroups.com
#21343: Restrictions imposed by intermediate many-to-many relationships should be
mentioned in many-to-many reference docs
----------------------------------+--------------------------------------
Reporter: EvilDMP | Owner: nobody

Type: Uncategorized | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: afraid-to-commit | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by EvilDMP):

https://docs.djangoproject.com/en/dev/ref/models/relations/ doesn't
mention it either.

I think people are likely to land on those pages, and - if they are
dealing with intermediate models - may be puzzled to find that `add()` etc
don't work. Only a sentence would be required: "note that if you are using
an intermediate model, some of the related manager's methods are disabled.
See https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-
on-many-to-many-relationships"

--
Ticket URL: <https://code.djangoproject.com/ticket/21343#comment:2>

Django

unread,
Oct 28, 2013, 10:45:52 AM10/28/13
to django-...@googlegroups.com
#21343: Restrictions imposed by intermediate many-to-many relationships should be
mentioned in many-to-many reference docs
--------------------------------------+------------------------------------
Reporter: EvilDMP | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: afraid-to-commit | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/21343#comment:3>

Django

unread,
Jan 16, 2014, 8:39:05 AM1/16/14
to django-...@googlegroups.com
#21343: Restrictions imposed by intermediate many-to-many relationships should be
mentioned in many-to-many reference docs
--------------------------------------+------------------------------------
Reporter: EvilDMP | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: afraid-to-commit | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"a6e3fb80b0e079c49da722515ed71768022264b8"]:
{{{
#!CommitTicketReference repository=""
revision="a6e3fb80b0e079c49da722515ed71768022264b8"
Fixed #21343 -- Noted many-to-many restrictions with intermediate model.

Thanks EvilDMP for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21343#comment:4>

Reply all
Reply to author
Forward
0 new messages