diff options
| author | Mohammad Salehi <mmmmmllk36@gmail.com> | 2024-08-10 17:14:38 +0330 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-08-12 19:58:37 +0200 |
| commit | ca47884410acb7cb1d36bc8a573b67a5b197d3e2 (patch) | |
| tree | 1e70a0d96c5472999a17e0378c7d142ecd80ba72 /docs | |
| parent | d84200e4eb4d20116080130c612ba157a4718977 (diff) | |
Fixed #35623 -- Documented that a field cannot be named 'check'.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/models.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index aefb35ed9c..369747c263 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -720,6 +720,9 @@ Django places some restrictions on model field names: #. A field name cannot end with an underscore, for similar reasons. +#. A field name cannot be ``check``, as this would override the check + framework's ``Model.check()`` method. + These limitations can be worked around, though, because your field name doesn't necessarily have to match your database column name. See the :attr:`~Field.db_column` option. |
