SimpleTemplateResponse.__init__(template, context=None, content_type=None, status=None, charset=None, using=None) [source]
Instantiates a SimpleTemplateResponse object with the given template, context, content type, HTTP status, and charset.
-
template - A backend-dependent template object (such as those returned by
get_template()), the name of a template, or a list of template names. -
context - A
dictof values to add to the template context. By default, this is an empty dictionary. -
content_type - The value included in the HTTP
Content-Typeheader, including the MIME type specification and the character set encoding. Ifcontent_typeis specified, then its value is used. Otherwise,DEFAULT_CONTENT_TYPEis used. -
status - The HTTP status code for the response.
-
charset - The charset in which the response will be encoded. If not given it will be extracted from
content_type, and if that is unsuccessful, theDEFAULT_CHARSETsetting will be used. -
using - The
NAMEof a template engine to use for loading the template.
Please login to continue.