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

Cleanup get_rendered_html_form and get_raw_data_form #2089

Closed
tomchristie opened this issue Nov 18, 2014 · 6 comments
Closed

Cleanup get_rendered_html_form and get_raw_data_form #2089

tomchristie opened this issue Nov 18, 2014 · 6 comments
Labels
Milestone

Comments

@tomchristie
Copy link
Member

The BrowsableAPIRenderer does some pretty ugly hackery in creating the raw data form and HTML input form. We really need to spend some time rationalizing this and cleaning it up.

@tomchristie tomchristie added this to the 3.1 Release milestone Nov 18, 2014
tomchristie added a commit that referenced this issue Nov 18, 2014
@tomchristie
Copy link
Member Author

Also include regression tests for #2205, and tidy up ugly instance checking.

@tomchristie
Copy link
Member Author

Pushing all further HTML specific stuff to 3.2.0.

@rerobins
Copy link

Is it possible to add an option to remove the form content from the bottom of the browsable API?

I'm attempting to do some performance testing on my pages (using django-debug-toolbar). First step was to reduce the number of queries that I am executing in my views. The form that is displayed at the bottom has the potential to implement 3x more queries than the JSON renderer does.

I've worked around this by extending the BrowsableAPIRenderer and overriding the get_raw_data_form method to return None. I did this because I couldn't find a setting that would provide this functionality for me.

Am I missing a better way of implementing this functionality? I don't want to turn the forms off completely, just during some of my performance testing.

@tomchristie
Copy link
Member Author

Dropping this ticket - too specific at this point.
We'll do some general clean up for the browsable API and admin API, but can happen after 3.3.0, and we'll decide at that point what the clean up priorities actually are.

@antwan
Copy link

antwan commented Jul 20, 2015

I know this is closed, but can you pingback the future discussions in this ticket ? I've made some generic improvements in my apps which might be worthwhile regarding this, and I'd like to contribute to discussions when this will happen.
Thanks !

@tomchristie
Copy link
Member Author

can you pingback the future discussions in this ticket ?

Can't promise to remember, but no objection otherwise, sure. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants