[3.1.x] Fixed #32310 -- Fixed note about reverse accessors for intermediate table for self-referential ManyToManyField.

Backport of 2d6c9b97bc from master
This commit is contained in:
Fabio Sangiovanni 2021-01-04 18:36:35 +01:00 committed by Mariusz Felisiak
parent e080bf49a0
commit 6d3a623f71
1 changed files with 3 additions and 5 deletions

View File

@ -1846,11 +1846,9 @@ that control how the relationship functions.
.. note::
Recursive relationships using an intermediary model and defined as
symmetrical (that is, with :attr:`symmetrical=True
<ManyToManyField.symmetrical>`, which is the default) can't determine
the reverse accessors names, as they would be the same. You need to set
a :attr:`~ForeignKey.related_name` to at least one of them. If you'd
Recursive relationships using an intermediary model can't determine the
reverse accessors names, as they would be the same. You need to set a
:attr:`~ForeignKey.related_name` to at least one of them. If you'd
prefer Django not to create a backwards relation, set ``related_name``
to ``'+'``.