1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #26648 -- Added a system check for invalid related_query_name's containing underscores.

This commit is contained in:
Michal Petrucha
2016-05-22 21:10:24 +02:00
committed by Tim Graham
parent effb4ed6f5
commit 686a593aaa
3 changed files with 63 additions and 3 deletions

View File

@@ -206,6 +206,10 @@ Related Fields
* **fields.E307**: The field ``<app label>.<model>.<field name>`` was declared
with a lazy reference to ``<app label>.<model>``, but app ``<app label>``
isn't installed or doesn't provide model ``<model>``.
* **fields.E308**: Reverse query name ``<related query name>`` must not end
with an underscore.
* **fields.E309**: Reverse query name ``<related query name>`` must not contain
``'__'``.
* **fields.E310**: No subset of the fields ``<field1>``, ``<field2>``, ... on
model ``<model>`` is unique. Add ``unique=True`` on any of those fields or
add at least a subset of them to a unique_together constraint.