-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use computed property for autocomplete search #36
Comments
Unfortunately, because @brylie Can you tell me more about your use case? |
Well, we basically needed to search for authors for an article. The authors table had |
That makes sense—and that's also the sort of thing that could plausibly be solved in-database with annotations or something like them. Hmmmmmmm. 🤔 |
I'm officially marking this as a desirable feature and will accept a PR that makes the autocomplete search method customizable. See discussion in #47 for more information. |
Hi guys. It seems to me that flexibility could be greatly improved by allowing a list of fields to be specified for searching rather than limiting it to a single field. You could put the query together like so (note: the query string can also be split to allow single-word matching on different fields): https://github.com/wagtail/wagtail/blob/master/wagtail/contrib/modeladmin/helpers/search.py#L31 |
Is it possible to use a model property for the
autocomplete_search_field
? E.g. a property likefull_name
that concatenates two fieldsfirst_name
andlast_name
?The text was updated successfully, but these errors were encountered: