Skip to content

Use serializer_class for browsable API display, even on plain APIView. #2743

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

Merged
merged 2 commits into from
Mar 23, 2015

Conversation

maurodoglio
Copy link
Contributor

This complicates a little bit the logic in BrowsableAPIRenderer.get_rendered_html_form, but it allows to use view.serializer_class when get_serializer is not there.
I tested it locally and it seems to be working.

@maurodoglio
Copy link
Contributor Author

Let me know if you prefer to have a single commit

@tomchristie
Copy link
Member

Let me know if you prefer to have a single commit

No, fine as it is.

@tomchristie
Copy link
Member

Nice!

@tomchristie
Copy link
Member

Worth adding screenshots of before and after to the thread for these sort of pull requests, but looks great! :)

@tomchristie tomchristie added this to the 3.1.1 Release milestone Mar 22, 2015
@tomchristie tomchristie changed the title Serializer class html renderer Use serializer_class for browsable API display, even on plain APIView. Mar 22, 2015
@maurodoglio
Copy link
Contributor Author

Yeah I can do that

@maurodoglio
Copy link
Contributor Author

Before: http://imgur.com/hc5hvru
After: http://imgur.com/VhaUXET

tomchristie added a commit that referenced this pull request Mar 23, 2015
Use `serializer_class` for browsable API display, even on plain APIView.
@tomchristie tomchristie merged commit 1668010 into encode:master Mar 23, 2015
@tomchristie
Copy link
Member

Great!
Btw. you can include images directly in the thread, rather than having to link to external images :)

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.

2 participants