Skip to content

Adjust schema get_filter_fields rules to match framework #5454

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

Conversation

carltongibson
Copy link
Collaborator

Closes #5237

Generics/ModelViewset performs filtering on: list, retrieve, put, patch and destroy (plus method equivalents).

i.e. on list plus anything that calls get_object.

This PR makes schema generation follow that.

It adds AutoSchema._allows_filters() which can be overridden in subclasses.

I’ve made this initially “private” so we can make quick changes if needs be in a 3.7.1 etc.

Closes encode#5237

Generics/ModelViewset performs filtering on: list, retrieve, put, patch and destroy (plus method equivalents).

i.e. on list plus anything that calls `get_object`.

This PR makes schema generation follow that.

It adds `AutoSchema._allows_filters()` which can be overridden in subclasses.

I’ve made this initially “private” so we can make quick changes if needs be in a 3.7.1 etc.
@carltongibson carltongibson added this to the 3.7.0 Release milestone Sep 26, 2017
@carltongibson carltongibson merged commit b1c6ea1 into encode:master Sep 27, 2017
@carltongibson carltongibson deleted the fix/5237-get_filter_fields-inconsistency branch September 27, 2017 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant