Skip to content

Conversation

@JostCrow
Copy link
Contributor

This is a small change that lets you prettify the query parameters.

You can still use the original parameters to filter.

I hope that this is something that you are interested in.

@coveralls
Copy link

coveralls commented Aug 15, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling ad60133 on JostCrow:prettify_query_params into 66f3ac2 on miki725:master.

@miki725
Copy link
Owner

miki725 commented Aug 17, 2017

I was actually thinking about something like that except at filterset layer vs DRF integration. Doing in DRF will obviously only prettify things only for DRF whereas this seems like useful addition for other usages. Haven't decided though on good approach for doing that though. Would prefer to keep things declarative:

class MyFilterSet(ModelFilterSet):
    class Meta(object):
        model = Foo
        prettify = {..}

but that will not work for regular filtersets and this just looks ugly to me:

class MyFilterSet(FilterSet):
    foo = FooFilterSet()
    prettify = {...}

@JostCrow
Copy link
Contributor Author

I agree that this needs to be a global option instead of for DRF only.

With the filter part, I don't know what would be best yet. Since I did not dive into the code yet. This was just a quick build and it needs to be improved. I will have a better look at the code for a better solution.

@tuffnatty
Copy link

I believe this feature is now provided by #66

@JostCrow JostCrow closed this Nov 9, 2018
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

Successfully merging this pull request may close these issues.

4 participants