Parcourir la source

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

Mohammad Salehi il y a 7 mois
Parent
commit
ca47884410
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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.