Please make TemplateHTMLRenderer interoperable with JSONRenderer #8568
Unanswered
mymedia2
asked this question in
Ideas & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
It looks that TemplateHTMLRenderer considers response.data as a context for the template. This behaviour however is not convenient in view sets if both JSONPRenderer and TemplateHTMLRenderer are encountered on the same renderer_classes list.
Though, the list view does not work out-of-box because of #5236. And in the detail view, I can't grab single object as a whole in 'order_page.html' (for example to json_script).
I propose to revise the TemplateHTMLRenderer.get_template_context() method in some way and provide the 'data' key from there. The current view and some more environment info would also be handy, I suppose.
Beta Was this translation helpful? Give feedback.
All reactions