shortcuts.render()

render(request, template_name, context=None, content_type=None, status=None, using=None) [source]

Combines a given template with a given context dictionary and returns an HttpResponse object with that rendered text.

Django does not provide a shortcut function which returns a TemplateResponse because the constructor of TemplateResponse offers the same level of convenience as render().

doc_Django
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.