summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2021-09-30 21:40:01 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-10-05 06:37:59 +0200
commit515d3c591cc65c77b8d46391d15ded576b037d85 (patch)
tree1d44c74ea94a4af30502731e1695c3ac82c34101 /docs/ref
parent816e80930251497635b97a772cc832edf09cdede (diff)
[4.0.x] Fixed #22224 -- Added note about supplying missing values for non-nullable fields with blank=True.
Backport of cd6bddd44e0a1c3c6a96a3677f8366ef0e4b6782 from main
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/fields.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index e03b8fa82a..f2b88139e5 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -73,6 +73,12 @@ purely database-related, whereas :attr:`~Field.blank` is validation-related. If
a field has ``blank=True``, form validation will allow entry of an empty value.
If a field has ``blank=False``, the field will be required.
+.. admonition:: Supplying missing values
+
+ ``blank=True`` can be used with fields having ``null=False``, but this will
+ require implementing :meth:`~django.db.models.Model.clean` on the model in
+ order to programmatically supply any missing values.
+
.. _field-choices:
``choices``