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

Automatically get JSONRenderer from django rest framework settings #87

Merged
merged 4 commits into from Nov 7, 2014

Conversation

Projects
None yet
3 participants
@ErwinJunge
Copy link
Contributor

ErwinJunge commented May 27, 2014

Instead of hardcoding rest_framework.renderers.JSONRenderer, get the first renderer with format == 'json' from rest_framework.settings.api_settings.DEFAULT_RENDERER_CLASSES. Fallback to JSONRenderer if none of the renderers match.

This mimics the way rest_framework selects a renderer during content negotiation.

This fixes #36.

@jakob-o

This comment has been minimized.

Copy link

jakob-o commented Sep 3, 2014

+1

@ariovistus ariovistus force-pushed the marcgibbons:master branch 2 times, most recently from 4deab11 to 0da68cb Oct 30, 2014

@ErwinJunge

This comment has been minimized.

Copy link
Contributor

ErwinJunge commented Nov 6, 2014

I fixed the python 3 compatibility issue, all tests pass now. Is there something keeping this from getting merged?

@ariovistus

This comment has been minimized.

Copy link
Contributor

ariovistus commented Nov 6, 2014

sorry, I haven't had a chance to review this yet. Will do tonight.

ariovistus added a commit that referenced this pull request Nov 7, 2014

Merge pull request #87 from ErwinJunge/master
Automatically get JSONRenderer from django rest framework settings

@ariovistus ariovistus merged commit 62888db into marcgibbons:master Nov 7, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment