Skip to content
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

Better Handling of Multiple Lookup Fields #57

Open
mlavin opened this issue Nov 10, 2013 · 6 comments
Open

Better Handling of Multiple Lookup Fields #57

mlavin opened this issue Nov 10, 2013 · 6 comments
Milestone

Comments

@mlavin
Copy link
Owner

mlavin commented Nov 10, 2013

With support for multiple lookup fields there are some improvements that could probably be made in the ModelLookup. For instance if you are looking up a User based on first name and last name and search "John Doe" you won't find them because it searches for users with the first name "John Doe" or last name "John Doe" which is clearly not the desired behavior. How to tokenize the search term (in this case we want it by spaces) and how to combine the terms (OR vs AND) will likely need to be configurable.


@mlavin
Copy link
Owner Author

mlavin commented Nov 10, 2013

0.7 is focusing on client side changes (and there a lot) so this is getting bumped.


Original Comment By: Mark Lavin

@mlavin
Copy link
Owner Author

mlavin commented Nov 10, 2013

This seems like a good candidate for the next set of features.


Original Comment By: Mark Lavin

@mlavin
Copy link
Owner Author

mlavin commented Nov 10, 2013

Ah yes, shlex.split looks like it will make the search even more useful.


Original Comment By: Simeon Walker

@mlavin
Copy link
Owner Author

mlavin commented Nov 10, 2013

Thanks @simbloke! This looks pretty good. I might change this to use shlex.split so that quoted terms are not split.


Original Comment By: Mark Lavin

@mlavin
Copy link
Owner Author

mlavin commented Nov 10, 2013

I recently came across this whilst using selectable to so a person lookup. I solved it by using the basic query from grappelli, see attachment.


Original Comment By: Simeon Walker

@mlavin mlavin modified the milestone: 1.0 Jan 25, 2015
@pije76
Copy link

pije76 commented Aug 7, 2020

Are there a documentation to handling of multiple lookup fields?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants