Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions django/contrib/admin/static/admin/css/rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,10 @@ fieldset .fieldBox {
background-position: 0 -168px;
}

.selector-chooseall {
background: url(../img/selector-icons.svg) right -128px no-repeat;
}

:enabled.selector-chooseall:focus, :enabled.selector-chooseall:hover {
background-position: 100% -144px;
}

.selector-clearall {
background: url(../img/selector-icons.svg) 0 -160px no-repeat;
}

:enabled.selector-clearall:focus, :enabled.selector-clearall:hover {
background-position: 0 -176px;
}
Expand Down
22 changes: 5 additions & 17 deletions django/contrib/admin/static/admin/css/widgets.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,21 @@

.selector-chooseall, .selector-clearall {
display: inline-block;
height: 16px;
text-align: left;
padding: 4px 5px;
margin: 0 auto;
overflow: hidden;
font-weight: bold;
line-height: 16px;
color: var(--body-quiet-color);
color: var(--button-fg);
background-color: var(--button-bg);
text-decoration: none;
opacity: 0.55;
border: none;
border-radius: 4px;
}

:enabled.selector-chooseall:focus, :enabled.selector-clearall:focus,
:enabled.selector-chooseall:hover, :enabled.selector-clearall:hover {
color: var(--link-fg);
background-color: var(--button-hover-bg);
}

:enabled.selector-chooseall, :enabled.selector-clearall {
Expand All @@ -187,22 +187,10 @@
cursor: pointer;
}

.selector-chooseall {
padding: 0 18px 0 0;
background: url(../img/selector-icons.svg) right -160px no-repeat;
cursor: default;
}

:enabled.selector-chooseall:focus, :enabled.selector-chooseall:hover {
background-position: 100% -176px;
}

.selector-clearall {
padding: 0 0 0 18px;
background: url(../img/selector-icons.svg) 0 -128px no-repeat;
cursor: default;
}

:enabled.selector-clearall:focus, :enabled.selector-clearall:hover {
background-position: 0 -144px;
}
Expand Down
22 changes: 1 addition & 21 deletions django/contrib/admin/static/admin/img/selector-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 12 additions & 6 deletions docs/ref/models/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ option.
(including ``name``) each time. To work around name collisions, part of the
name may contain ``'%(app_label)s'`` and ``'%(class)s'``, which are
replaced, respectively, by the lowercased app label and class name of the
concrete model. For example ``CheckConstraint(condition=Q(age__gte=18),
name='%(app_label)s_%(class)s_is_adult')``.
concrete model. For example::

CheckConstraint(condition=Q(age__gte=18), name="%(app_label)s_%(class)s_is_adult")

.. admonition:: Validation of Constraints

Expand Down Expand Up @@ -99,7 +100,10 @@ This method must be implemented by a subclass.
A :class:`Q` object or boolean :class:`~django.db.models.Expression` that
specifies the conditional check you want the constraint to enforce.

For example, ``CheckConstraint(condition=Q(age__gte=18), name='age_gte_18')``
For example::

CheckConstraint(condition=Q(age__gte=18), name="age_gte_18")

ensures the age field is never less than 18.

.. admonition:: Expression order
Expand Down Expand Up @@ -156,9 +160,11 @@ Functional unique constraints have the same database restrictions as
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_booking')`` ensures each room can only be booked once for each
date.
For example::

UniqueConstraint(fields=["room", "date"], name="unique_booking")

ensures each room can only be booked once for each date.

``condition``
-------------
Expand Down
Loading