The "object-tools" container is never rendered as a descendant of
.form-row.
The "golink" CSS class is unused.
A <label> element has not been included in the login .submit-row since
5869afe32b.
The "help" CSS class from login.css has been unused since
0e5faf225c.
The <label> color in login.css is already inherited from the <body>
element and so does not need to be re-specified.
The #content-main container already has the property 'width: 100%' from
base.css and so does not need to be re-specified in login.css.
The <td> and <th> font-family property is inherited from the <body>
element and so does not need to be re-specified.
The <html> element has the attribute dir which automatically sets
the text direction in the layout. Adding the direction CSS property was
necessary to support IE which does not support the dir attribute, but IE
is no longer supported, so drop the direction property.
The 'font-size: 1em' property re-specifies the same font size. It
creates no visual difference.
The 'font-size: 14px' property often re-specifies the inherited value.
Avoid re-specifying it.
- Show "Clear all filters" only when any filter is selected.
- Preserve query string not related with filters.
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
.system-message, .system-message-title are unused since their
introduction in ce0d0cd9e2.
.float-right, .float-left, .align-left, .align-right, and .example are
unused since 6eb4f25692.
The eslint configuration and the admin script compress.py have been
updated for ES6.
The unused fallback of globals.django in jquery.init.js was removed. It
is always included before jsi18n-mocks.test.js and it always sets the
global value.
The script previously used the PyPI package closure, which is slightly
out of date and not maintained by Google.
The JavaScript contribution docs and the compress.py script now runs the
google-closure-compiler package in the recommended way. Google's
documentation on usage and installation can be found at:
https://github.com/google/closure-compiler-npm/tree/master/packages/google-closure-compiler#usage
This also makes the usage simpler as the package now runs through npm's
npx utility, which will automatically install google-closure-compiler to
a per-user cache.
The use of $(document).ready() was removed. The script is loaded at the
end of the document. Therefore, the referenced DOM elements are already
available and the script does not need to wait for the full DOM to be
ready before continuing.
Now that the script has no external dependencies, it can be loaded
asynchronously. As such, the async attribute was added to the script
element.
Since 8b30360322, the admin documentation
is explicit that only modern evergreen browsers are supported. This
allows removing several long standing workarounds for IE and Opera older
versions.
Since 2013, Opera is based on the Chromium blink engine.
The attribute action="" (empty string) on the <form> element is invalid
HTML5. The spec (https://html.spec.whatwg.org/#attr-fs-action) says:
> The action and formaction content attributes, if specified, must have
> a value that is a valid non-empty URL potentially surrounded by
> spaces.
Emphasis on non-empty. The action attribute is allowed to be omitted, in
which case the current URL is used which is the same behavior as now.
Thanks Simon Charette and Carlton Gibson for reviews.
Co-Authored-By: Jonas Haag <jonas@lophus.org>
Co-Authored-By: Christophe Baldy <christophe.baldy@polyconseil.fr>
Two-digit years in the range of [00, 68] are in the current century,
while [69,99] are in the previous century, according to the Open Group
Specification.
The Django "Model Meta options" docs provide examples and generally
point the reader to use lists for the unique_together and ordering
options. Follow our own advice for contrib models.
More generally, lists should be used for homogeneous sequences of
arbitrary lengths of which both unique_together and ordering are.
Reduced the number of queries required when performing cascade deletion
for a model referenced multiple time by another one by performing an
union of reference lookups.
"width" of DateTimeField inputs in admin tabular inline wasn't set
correctly what caused displaying too small inputs with responsive CSS
when timezone warning wasn't present.
The Python docs recommend passing a sequence to subprocess.run() when
possible. Doing so allows for automatic escaping and quoting of
arguments.
https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
> args is required for all calls and should be a string, or a sequence
> of program arguments. Providing a sequence of arguments is generally
> preferred, as it allows the module to take care of any required
> escaping and quoting of arguments (e.g. to permit spaces in file
> names).
Also removed `shell=True` where unnecessary.