Skip to content

Commit

Permalink
Fixed #35623 -- Documented that a field cannot be named 'check'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Salehi authored and sarahboyce committed Aug 12, 2024
1 parent f16a9a5 commit fedb269
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/topics/db/models.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit fedb269

Please sign in to comment.