def wrapper(request, *args, **kw): output = func(request, *args, **kw) if not isinstance(output, dict): return output return render_to_response( template_name, default_template_dict(request, output, title), context_instance=RequestContext(request))
def handler500(request): return handler( "500.html", Context(default_template_dict(request)), http.HttpResponseServerError)
def handler404(request): return handler( "404.html", RequestContext(request, default_template_dict(request)), http.HttpResponseNotFound)
def handler403(request): return handler( "403.html", RequestContext(request, default_template_dict(request)), http.HttpResponseForbidden)
def handler400(request): return handler( "400.html", Context(default_template_dict(request)), http.HttpResponseBadRequest)