#34339: Allow overriding construct_search().
-------------------------------+--------------------------------------
Reporter: Ramez Issac | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: 4.1
Severity: Normal | Resolution: wontfix
Keywords: admin search | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* type: Uncategorized => New feature
* resolution: => wontfix
* easy: 1 => 0
Comment:
> {{{
> class MyAdmin(admin.ModelAdmin):
> search_fields = ['client_id', # wont work
> 'client__id' # will work ]
>
> }}}
In such cases, you can always use the `__exact` lookup, e.g.
{{{#!python
class MyAdmin(admin.ModelAdmin):
search_fields = ['client_id__exact']
}}}
There is no need to change `construct_search()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/34339#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070186552a1443-ab05167a-0975-43a0-a881-b1e3f1346d06-000000%40eu-central-1.amazonses.com.