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

Underscoreize query params #68

Closed
wants to merge 1 commit into from
Closed

Conversation

reyzavk
Copy link

@reyzavk reyzavk commented Aug 5, 2019

query params isn't parsed to underscore, this means for filtering fields, user can't use camelCase. I add middleware to parse the request.GET, which will be turned into request.query_params by rest_framework.

@vbabiy
Copy link
Owner

vbabiy commented Sep 10, 2019

@Reyvel This is great, would you be able to add some tests.

@reyzavk
Copy link
Author

reyzavk commented Sep 10, 2019

sure, I'll look into it in the weekend

@frruit
Copy link

frruit commented Mar 6, 2020

Hi @Reyvel and @vbabiy,
i'm wondering why the middelware hasn't been added to the master branch also if there are not unit tests available right now. Also the current master isn't at the same state like the implementation on pip.

From my perspective this feature is required and it would be really great to have it inside your lib

@reyzavk
Copy link
Author

reyzavk commented Apr 25, 2020

Hey guys, sorry for the absence, busy with my work and it doesn't use django unfortunately.

Just checking this again rn. Here, I see the unittest doesn't use django testcase, so I am not sure how to implement my test. If someone can give me a direction that'll be superb

anyway if some of you need this feature rn you can copy my code and use it as middleware. I have used it in my previous workplace. The middleware simply call underscoreize method. And the only downfall I know is it doesn't support expandable fields like used in Django Flex Fields.

@abbasidaniyal
Copy link

Is anybody working on this? I'd be happy to take this up and write the missing test cases!

@meteozond
Copy link

We're working on our implementation of filter, ordering and schema camelization/decamelization
https://github.com/pik-software/pik-django-utils/tree/add-drf/pik/api/camelcase

@timmysmalls
Copy link

Could we add some tests and get this merged? As well as perhaps see if any outdated packages could be updated? @vbabiy

@syre
Copy link

syre commented Dec 10, 2022

@vbabiy i would also like to get this functionality in the project.

@vbabiy
Copy link
Owner

vbabiy commented Feb 13, 2023

Fixed in #123

@vbabiy vbabiy closed this Feb 13, 2023
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.

None yet

7 participants