summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/constraints.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/ref/models/constraints.txt b/docs/ref/models/constraints.txt
index 0ac54cf265..9e3119f600 100644
--- a/docs/ref/models/constraints.txt
+++ b/docs/ref/models/constraints.txt
@@ -52,12 +52,16 @@ option.
.. attribute:: CheckConstraint.check
-A :class:`Q` object that specifies the check you want the constraint to
-enforce.
+A :class:`Q` object or boolean :class:`~django.db.models.Expression` that
+specifies the check you want the constraint to enforce.
For example, ``CheckConstraint(check=Q(age__gte=18), name='age_gte_18')``
ensures the age field is never less than 18.
+.. versionchanged:: 3.1
+
+ Support for boolean :class:`~django.db.models.Expression` was added.
+
``name``
--------