Fixed #29408 -- Added validation of related fields and lookups in model Meta.ordering.

This commit is contained in:
Hasan Ramezani 2019-03-01 17:09:33 +01:00 committed by Mariusz Felisiak
parent 4dcbe6eb2d
commit 440505cb2c
4 changed files with 125 additions and 6 deletions

View file

@ -277,8 +277,8 @@ Models
supported for that option.
* **models.E014**: ``ordering`` must be a tuple or list (even if you want to
order by only one field).
* **models.E015**: ``ordering`` refers to the nonexistent field
``<field name>``.
* **models.E015**: ``ordering`` refers to the nonexistent field, related field
or lookup ``<field name>``.
* **models.E016**: ``indexes/index_together/unique_together`` refers to field
``<field_name>`` which is not local to model ``<model>``.
* **models.E017**: Proxy model ``<model>`` contains model fields.