Jump to >


Compatibility functions for django.shortcuts.

Note that this module is not considered API-stable. Changes may be made that remove or alter functionality in the future. Please use at your own risk.

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

Render a template name to a response.

This provides compatibility for the django.shortcuts.loader() across Django 1.6 on up.

  • request (django.http.HttpRequest) – The HTTP request from the client.

  • template_name (unicode) – The name of the template to render.

  • context (dict, optional) – The template context.

  • content_type (unicode, optional) – An optional content type to set for the response.

  • status (int, optional) – An optional HTTP status code to set for the response.

  • using (unicode, optional) – The optional template render backend to use to render this template. This is ignored for Django 1.6.


The resulting HTTP response.

Return type