MCPcopy
hub / github.com/django/django / render

Function render

django/shortcuts.py:20–28  ·  view source on GitHub ↗

Return an HttpResponse whose content is filled with the result of calling django.template.loader.render_to_string() with the passed arguments.

(
    request, template_name, context=None, content_type=None, status=None, using=None
)

Source from the content-addressed store, hash-verified

18
19
20def render(
21 request, template_name, context=None, content_type=None, status=None, using=None
22):
23 """
24 Return an HttpResponse whose content is filled with the result of calling
25 django.template.loader.render_to_string() with the passed arguments.
26 """
27 content = loader.render_to_string(template_name, context, request, using=using)
28 return HttpResponse(content, content_type, status)
29
30
31def redirect(

Callers 15

request_dataFunction · 0.90
nested_viewFunction · 0.90
return_unicodeFunction · 0.90
request_context_viewFunction · 0.90
template_exceptionFunction · 0.90
jsi18nFunction · 0.90
jsi18n_multi_catalogsFunction · 0.90
render_no_templateFunction · 0.90
request_processorFunction · 0.90
debug_processorFunction · 0.90

Calls 2

HttpResponseClass · 0.90
render_to_stringMethod · 0.80

Tested by 2

test_parsing_errorsMethod · 0.68