1 2 3 4 5 6 7 8 | # Render with context processors shortcut
def render_template(request, template_path, extra_context = {}):
from django.template import RequestContext
from django.shortcuts import render_to_response
c = RequestContext(request)
c.update(extra_context)
return render_to_response(template_path, context_instance=c)
|
More like this
- Render (with RequestContext) by alcides 3 years, 6 months ago
- render_to_response wrapper by Magus 4 years, 11 months ago
- render_to_response decorator by coleifer 1 year, 4 months ago
- Renderer decorator by GaretJax 4 years, 2 months ago
- render_to by asolovyov 3 years, 7 months ago
Comments