Releases: ahmedaljawahiry/django-admin-site-search
Releases · ahmedaljawahiry/django-admin-site-search
1.1.0
1.0.0
New Features
New search method: ModelAdmin's search_fields (703dc84)
Set the site_search_method
class attribute to admin_search_fields
to delegate search to each ModelAdmin's get_search_results(). I.e. only search fields defined in an admin's search_fields (#22).
This also adds implicit support for searching through foreign keys (#20).
Credit to @kevinrenskers for the idea.
Note - by default site_search_method
is set to model_char_fields
, which is the original behaviour. This default may be flipped in a future release.
Breaking changes
1. request
is now the first argument passed to all methods (a85a556)
For methods - that may be overridden - such as match_objects
or match_model
, the first argument is now Django's request
object.
2. Button CSS updates (6c1b68a)
.search-button
'sbackground-color
now uses--primary
..search-button:hover
now applies--header-branding-color
to thesvg
(search icon).
Visually, the difference is minimal. This is a simple fix for #26.