class TemplateHTMLRenderer(BaseRenderer): (source)
Known subclasses: rest_framework.renderers.StaticHTMLRenderer
An HTML renderer for use with templates. The data supplied to the Response object should be a dictionary that will be used as context for the template. The template name is determined by (in order of preference): 1. An explicit `.template_name` attribute set on the response. 2. An explicit `.template_name` attribute set on this class. 3. The return result of calling `view.get_template_names()`. For example: data = {'users': User.objects.all()} return Response(data, template_name='users.html') For pre-rendered HTML, see StaticHTMLRenderer.
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | render |
Renders data to HTML, using Django's standard template rendering. |
Method | resolve |
Undocumented |
Class Variable | charset |
Undocumented |
Class Variable | exception |
Undocumented |
Class Variable | format |
Undocumented |
Class Variable | media |
Undocumented |
Class Variable | template |
Undocumented |
Inherited from BaseRenderer
:
Class Variable | render |
Undocumented |
rest_framework.renderers.StaticHTMLRenderer
Renders data to HTML, using Django's standard template rendering. The template name is determined by (in order of preference): 1. An explicit .template_name set on the response. 2. An explicit .template_name set on this class. 3. The return result of calling view.get_template_names().