mirror of
https://github.com/django/django.git
synced 2025-11-17 18:48:15 +00:00
Fixed #23338 -- Added warning when unique=True on ForeigKey
Thanks Jonathan Lindén for the initial patch, and Tim Graham and Gabe Jackson for the suggestions.
This commit is contained in:
parent
abf87333a1
commit
f39b0421b4
8 changed files with 54 additions and 4 deletions
|
|
@ -154,6 +154,8 @@ Related Fields
|
|||
* **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``.
|
||||
* **fields.W342**: Setting ``unique=True`` on a ``ForeignKey`` has the same
|
||||
effect as using a ``OneToOneField``.
|
||||
|
||||
Signals
|
||||
~~~~~~~
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue