In MTI or ForeignKey as primary key cases, it is required to fetch the attname
from the field instance on the remote model in order to reliably resolve the
to_field_name.
Co-authored-by: Johannes Maron <info@johanneshoppe.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
* Fixed#29010 -- Added limit_choices_to support to autocomplete fields.
* Fixed#29138 -- Allowed autocomplete fields to target a custom
to_field rather than the PK.
Previously, the button's container had a padding of 9.4em which was
approximately center but not precisely. Now, the container uses
'align:text-center' to let the browser center the button.
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.
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.
- Used selected "databases" instead of django.db.connections.
- Made routers in tests.migrations skip migrations on unexpected
databases.
- Added DiscoverRunnerGetDatabasesTests.assertSkippedDatabases() hook
which properly asserts messages about skipped databases.