| Age | Commit message (Collapse) | Author |
|
list_display.
When using related field lookups like 'parent__is_active' in list_display,
the admin now correctly detects if the final field is a BooleanField and
displays boolean icons instead of 'True'/'False' text.
Modified lookup_field() in django/contrib/admin/utils.py to retrieve the
final field from the path when traversing relations using LOOKUP_SEP (__),
allowing display_for_field() to properly handle BooleanFields.
|
|
Instead of casting non-text fields to CharField (which prevents index
usage), skip exact lookups when the search term fails
formfield.to_python().
This preserves index usage for valid searches while gracefully handling
invalid search terms by simply not including them in the query for that
field.
For multi-term searches like 'foo 123' on search_fields=['name', 'age__exact']:
- 'foo': invalid for age, so only name lookup is used
- '123': valid for both, so both lookups are used
This entails a slight increase in permissiveness for search terms that
can be normalized by formfield.to_python().
|
|
|
|
when in list_display_links.
|
|
for models with a __html__ method.
Thank you Claude Paroz for the report.
Regression in 85366fbca723c9b37d0ac9db1d44e3f1cb188db2.
|
|
Co-authored-by: Alex Garcia <me@alexoteiza.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Nina Menezes <https://github.com/nmenezes0>
|
|
Regression in 27aa7035f57f0db30b6632e4274e18b430906799.
|
|
|
|
Regression in 917cc288a38f3c114a5440f0749b7e5e1086eb36.
|
|
Thanks Krzysztof Nazarewski for the initial patch.
|
|
|
|
|
|
ForeignKey/OneToOneField
|
|
ModelAdmin.list_display
Forwardport of 2456276b0250c9f21d580ca6c3f3c86345ad6370 from stable/1.8.x
|
|
relations.
This was fixed earlier but only when the M2M relation was at the first
level on the object. This commit fixes the issue even when the M2M is
at deeper levels, such as behind a foreign key.
|
|
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
Before this change, the get_admin_log method would expect User model's
FK to be named `id`. When changing that FK name, admin/index.html
rendering would fail.
This includes:
* Changed the use of id for the use of pk property.
* Added a regression test that fails without the patch.
This commit refs #20088.
|
|
return a QuerySet.
|
|
|