mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #19671 -- Added warnings that null and validators are ignored for ManyToManyField.
Thanks Loic Bistuer and Tim Graham for help and review.
This commit is contained in:
parent
3a85aae2ea
commit
011abb7d96
14 changed files with 76 additions and 16 deletions
|
@ -148,6 +148,8 @@ Related Fields
|
|||
* **fields.E338**: The intermediary model ``<through model>`` has no field
|
||||
``<field name>``.
|
||||
* **fields.E339**: ``<model>.<field name>`` is not a foreign key to ``<model>``.
|
||||
* **fields.W340**: ``null`` has no effect on ``ManyToManyField``.
|
||||
* **fields.W341**: ``ManyToManyField`` does not support ``validators``.
|
||||
|
||||
Signals
|
||||
~~~~~~~
|
||||
|
|
|
@ -1448,6 +1448,10 @@ that control how the relationship functions.
|
|||
|
||||
If in doubt, leave it to its default of ``True``.
|
||||
|
||||
:class:`ManyToManyField` does not support :attr:`~Field.validators`.
|
||||
|
||||
:attr:`~Field.null` has no effect since there is no way to require a
|
||||
relationship at the database level.
|
||||
|
||||
.. _ref-onetoone:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue