Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed #35623 -- Documented that a field cannot be named 'check'.
  • Loading branch information
Mohammad Salehi authored and sarahboyce committed Aug 12, 2024
commit fedb26994e42ad0ce256508af56e45d209eab59c
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