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
Allow ignoring query parameters on list views #88
Conversation
070ffef
to
f7b983e
Compare
Thanks, this is useful though I have some thoughts about the API.
I ask this because I would like to synchronize this functionality with wq.db, specifically the (currently undocumented) attribute on views called |
An alternative (or addition) to making this configurable might be to have wq/model.js read from the list of model fields and only filter on the ones that match. This is essentially what filters.py does here. One tricky part is that filters.py uses any and all Django Model fields, whereas wq/model.js would only have access to writable serializer fields (since that's what is used to generate the |
Thanks for your feedback! I think I would favour this automatic ignoring of filtering criteria, because it means editing one files less when introducing another parameter. It also means one configuration option less. (And if it is not implemented, we probably should display or log a warning.) |
f7b983e
to
bc1dd9b
Compare
f16546e
to
6e22b3e
Compare
6e22b3e
to
0eaf15a
Compare
I implemented this to default to defined fields, but allow override via config.
|
I'd like to parametrize views using links. Unfortunately list views use all query parameters to filter data, so
context.list
becomes empty. This change allows ignoring prefixed parameters, and the prefix is configurable.