1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #26718 -- Added system check for existence of the fields specified by ForeignKey.to_field.

This commit is contained in:
Sergey Fedoseev
2016-06-07 13:55:27 +05:00
committed by Tim Graham
parent f6681393d3
commit 21130ce1a9
3 changed files with 75 additions and 0 deletions

View File

@@ -211,6 +211,8 @@ Related Fields
add at least a subset of them to a unique_together constraint.
* **fields.E311**: ``<model>`` must set ``unique=True`` because it is
referenced by a ``ForeignKey``.
* **fields.E312**: The ``to_field`` ``<field name>`` doesn't exist on the
related model ``<app label>.<model>``.
* **fields.E320**: Field specifies ``on_delete=SET_NULL``, but cannot be null.
* **fields.E321**: The field specifies ``on_delete=SET_DEFAULT``, but has no
default value.