summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNick Touran <nick@partofthething.com>2021-08-04 13:19:29 -0700
committerCarlton Gibson <carlton@noumenal.es>2021-08-06 11:57:02 +0200
commit5d4f21b16f002ed5202a68d6977346ccf53b0b0e (patch)
tree37b2bf5ee9bd6b549020dc34a67bdd3ede217519 /docs
parent1fb21ab3770bdc07fc847e131fa252759befadd2 (diff)
Fixed #32983 -- Added system check for redundant related_name on symmetrical M2M fields.
Since ManyToManyFields defined with `symmetrical=True` do not add a related field to the target model, including a `related_name` argument will never do what the coder likely expects. This makes including a related_name with a symmetrical model raise a system check warning. ticket-32983
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/checks.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt
index 3147114f8d..2ea2fd0df2 100644
--- a/docs/ref/checks.txt
+++ b/docs/ref/checks.txt
@@ -313,6 +313,8 @@ Related fields
with a ``through`` model.
* **fields.W344**: The field's intermediary table ``<table name>`` clashes with
the table name of ``<model>``/``<model>.<field name>``.
+* **fields.W345**: ``related_name`` has no effect on ``ManyToManyField`` with a
+ symmetrical relationship, e.g. to "self".
Models
------