1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #27295 -- Added a system check to prohibit model names that start or end with an underscore or contain double underscores.

This commit is contained in:
Quentin Fulsher
2016-10-11 00:59:17 -07:00
committed by Tim Graham
parent 41759c9082
commit f62abfc03d
4 changed files with 73 additions and 2 deletions

View File

@@ -141,6 +141,10 @@ Models
* **models.E022**: ``<function>`` contains a lazy reference to
``<app label>.<model>``, but app ``<app label>`` isn't installed or
doesn't provide model ``<model>``.
* **models.E023**: The model name ``<model>`` cannot start or end with an
underscore as it collides with the query lookup syntax.
* **models.E024**: The model name ``<model>`` cannot contain double underscores
as it collides with the query lookup syntax.
Fields
~~~~~~