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

CamelCaseJSONRenderer alter response.data #26

Closed
magul opened this issue Mar 19, 2017 · 4 comments
Closed

CamelCaseJSONRenderer alter response.data #26

magul opened this issue Mar 19, 2017 · 4 comments

Comments

@magul
Copy link
Contributor

magul commented Mar 19, 2017

As it says in Django REST Framework documentation

.data
The unrendered content of a Request object.

Unfortunatelly it occurs that CamelCaseJSONRenderer is changing response.data from

{ 'abc_def': True }

into

{ 'abcDef': True }

For minimal example see: https://github.com/magul/drf-cc-26 (there are 4 tests and 1 is failing because of the issue).

@sadan
Copy link

sadan commented Apr 6, 2017

Any idea if this package works with latest DRF?

@magul
Copy link
Contributor Author

magul commented Apr 6, 2017

@sadan as You can see in https://github.com/magul/drf-cc-26 I'm using it with

djangorestframework==3.6.2

@vstoykov
Copy link

vstoykov commented May 15, 2017

Probably the issue is here https://github.com/vbabiy/djangorestframework-camel-case/blob/master/djangorestframework_camel_case/util.py#L21 because it will replace list items in place instead of creating new one as it do with dict objects.
Can you prepare a PR with a fix?

Edit: never mind I saw that you already made a PR.

@vbabiy
Copy link
Owner

vbabiy commented Jul 7, 2017

Thanks @magul for the report should be fixed on master

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

No branches or pull requests

4 participants