1
0
mirror of https://github.com/django/django.git synced 2025-05-07 23:46:30 +00:00

Fixed #35623 -- Documented that a field cannot be named 'check'.

This commit is contained in:
Mohammad Salehi 2024-08-10 17:14:38 +03:30 committed by Sarah Boyce
parent d84200e4eb
commit ca47884410

View File

@ -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 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 These limitations can be worked around, though, because your field name doesn't
necessarily have to match your database column name. See the necessarily have to match your database column name. See the
:attr:`~Field.db_column` option. :attr:`~Field.db_column` option.