1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +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:
Diego Guimarães
2014-09-08 19:38:07 +02:00
committed by Tim Graham
parent abf87333a1
commit f39b0421b4
8 changed files with 54 additions and 4 deletions

View File

@@ -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
~~~~~~~