From ca47884410acb7cb1d36bc8a573b67a5b197d3e2 Mon Sep 17 00:00:00 2001 From: Mohammad Salehi Date: Sat, 10 Aug 2024 17:14:38 +0330 Subject: [PATCH] Fixed #35623 -- Documented that a field cannot be named 'check'. --- docs/topics/db/models.txt | 3 +++ 1 file changed, 3 insertions(+) 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.