浏览代码

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

Mohammad Salehi 7 月之前
父节点
当前提交
ca47884410
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      docs/topics/db/models.txt

+ 3 - 0
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.