Kaydet (Commit) f8f0f92e authored tarafından Mariusz Felisiak's avatar Mariusz Felisiak

Fixed UniqueConstraint example in ref/models/constraints.txt.

üst 0a01ca80
......@@ -78,7 +78,10 @@ The name of the constraint.
A :class:`Q` object that specifies the condition you want the constraint to
enforce.
For example, ``UniqueConstraint(fields=['user'], condition=Q(status='DRAFT')``
For example::
UniqueConstraint(fields=['user'], condition=Q(status='DRAFT'), name='unique_draft_user')
ensures that each user only has one draft.
These conditions have the same database restrictions as
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment