summaryrefslogtreecommitdiff
path: root/tests/admin_changelist/models.py
AgeCommit message (Collapse)Author
2026-03-18Fixed #36926 -- Made admin use boolean icons for related BooleanFields in ↵huwaiza tahir
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.
2026-01-30Fixed #36865 -- Removed casting from exact lookups in admin searches.mlissner
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().
2025-01-10Fixed #36032 -- Rendered URLField values as links in the admin.antoliny0919
2025-01-08Fixed #36063 -- Made a FileField navigate to the object admin change page ↵antoliny0919
when in list_display_links.
2024-07-18Fixed #35606, Refs #34045 -- Fixed rendering of ModelAdmin.action_checkbox ↵Hisham Mahmood
for models with a __html__ method. Thank you Claude Paroz for the report. Regression in 85366fbca723c9b37d0ac9db1d44e3f1cb188db2.
2024-02-05Fixed #10743 -- Allowed lookups for related fields in ModelAdmin.list_display.Tom Carrick
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>
2023-01-30Fixed #34283 -- Escaped title in admin's changelist filters.Stanislav Volyk
Regression in 27aa7035f57f0db30b6632e4274e18b430906799.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2018-06-01Fixed #28462 -- Decreased memory usage with ModelAdmin.list_editable.Adam Donaghy
Regression in 917cc288a38f3c114a5440f0749b7e5e1086eb36.
2017-11-18Fixed #26184 -- Allowed using any lookups in ModelAdmin.search_fields.Krzysztof Nazarewski
Thanks Krzysztof Nazarewski for the initial patch.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-05-28Fixed #24851 -- Fixed crash with reverse one-to-one relation in ↵Tim Graham
ModelAdmin.list_display Forwardport of 2456276b0250c9f21d580ca6c3f3c86345ad6370 from stable/1.8.x
2015-05-06Fixed #16609 -- Fixed duplicate admin results when searching nested M2M ↵Samuel Paccoud
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.
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-03-19Fixed #20088 -- Changed get_admin_log not to depend on User id fieldJuan Catalano
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.
2013-03-08Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that ↵Loic Bistuer
return a QuerySet.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner