-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
filter_list allowing __icontains and similars #118
Comments
Hey @Seykotron. You can add the class AuthorCRUD(CRUDView):
model = Author
...
search_fields = ['name__icontains'] And it will search like the Marked as feature :-) |
I have it developed (in features) in search I also know that it works out
of the box.
:)
Thanks!!
El mié., 28 ago. 2019 12:56, Oscar M. Lage <[email protected]>
escribió:
… Hey @Seykotron <https://github.com/Seykotron>.
You can add the icontains in the search out of the box. If you have an
Author(name, description) model you can add the following to the CRUDView
instance:
class AuthorCRUD(CRUDView):
model = Author
...
search_fields = ['name__icontains']
And it will search like the icontains in the name field. We already have
that feature but for search, not for list_filter. Dunno if that could
help you, other than that would be nice to have icontains in filters too.
Marked as feature :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#118?email_source=notifications&email_token=AAUFIZQDCMYXZENNDLLLOW3QGZKWBA5CNFSM4INV4PH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5KW7KA#issuecomment-525692840>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUFIZXGW65GTWZLXZXSJD3QGZKWBANCNFSM4INV4PHQ>
.
|
Nice!, could you please send a PR? |
Yes, let me create a branch and paste the functionality ^^
:)
El mié., 28 ago. 2019 a las 19:15, Oscar M. Lage (<[email protected]>)
escribió:
… I have it developed
Nice!, could you please send a PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#118?email_source=notifications&email_token=AAUFIZV6DPYKZUAZSVPPVC3QG2XCTA5CNFSM4INV4PH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5L2RVI#issuecomment-525838549>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUFIZVSSEF4F5RYX2PRX7DQG2XCTANCNFSM4INV4PHQ>
.
|
I owe you time ago ;) PR sended!! :P |
Hello,
Can we add that feature? Would be nice to filter not just the exact literal, right now you cant do for example name__icontains because it checks if the attr "name__icontains" exists in the model I think we can split the string for __ and get the first part of the string to search the field.
Sorry for my english :)
The text was updated successfully, but these errors were encountered: