class documentation

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_exception_template Undocumented
Method get_template_context Undocumented
Method get_template_names Undocumented
Method render Renders data to HTML, using Django's standard template rendering.
Method resolve_template Undocumented
Class Variable charset Undocumented
Class Variable exception_template_names Undocumented
Class Variable format Undocumented
Class Variable media_type Undocumented
Class Variable template_name Undocumented

Inherited from BaseRenderer:

Class Variable render_style Undocumented
def get_exception_template(self, response): (source)

Undocumented

def get_template_context(self, data, renderer_context): (source)

Undocumented

def get_template_names(self, response, view): (source)

Undocumented

def render(self, data, accepted_media_type=None, renderer_context=None): (source)

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().

def resolve_template(self, template_names): (source)

Undocumented

exception_template_names: list[str] = (source)

Undocumented

template_name = (source)

Undocumented