def r2r(template_name, context=None, request=None, processors=None, mimetype=None): if JINJA: try: return djangojinja2.render_to_response(template_name, context, request, processors, mimetype) except TemplateDoesNotExist: pass return render_to_response(template_name, context, request and RequestContext(request) or request)
def new_f(request, *args, **kwargs): ret = f(request, *args, **kwargs) if isinstance(ret, HttpResponse): return ret ret["request"] = request ret["view_params"] = kwargs return render_to_response(template_name, ret, request=request)
def r2r(template_name, context=None, request=None, processors=None, mimetype=None): if JINJA: try: return djangojinja2.render_to_response(template_name, context, request, processors, mimetype) except TemplateDoesNotExist: pass return render_to_response(template_name, context, request and RequestContext(request) or request)