92
95
return HttpResponse(t.render(c),
93
96
content_type="application/xhtml+xml")
105
return render(request, 'index.html', dirs=('custom_templates',))
99
.. function:: render_to_response(template_name[, dictionary][, context_instance][, content_type])
110
.. function:: render_to_response(template_name[, dictionary][, context_instance][, content_type][, dirs])
101
112
Renders a given template with a given context dictionary and returns an
102
113
:class:`~django.http.HttpResponse` object with that rendered text.