Fixed typos in docs/ref/models/constraints.txt.
This commit is contained in:
parent
4b9d72210f
commit
cf1fe22009
|
@ -34,7 +34,7 @@ option.
|
|||
A :class:`Q` object that specifies the check you want the constraint to
|
||||
enforce.
|
||||
|
||||
For example ``CheckConstraint(check=Q(age__gte=18), name='age_gte_18')``
|
||||
For example, ``CheckConstraint(check=Q(age__gte=18), name='age_gte_18')``
|
||||
ensures the age field is never less than 18.
|
||||
|
||||
``name``
|
||||
|
@ -59,8 +59,9 @@ The name of the constraint.
|
|||
A list of field names that specifies the unique set of columns you want the
|
||||
constraint to enforce.
|
||||
|
||||
For example ``UniqueConstraint(fields=['room', 'date'], name='unique_location')``
|
||||
ensures only one location can exist for each ``date``.
|
||||
For example, ``UniqueConstraint(fields=['room', 'date'],
|
||||
name='unique_booking')`` ensures each room can only be booked once for each
|
||||
date.
|
||||
|
||||
``name``
|
||||
--------
|
||||
|
|
Loading…
Reference in New Issue