(request, template_name=None, extra_context=None)
return HttpResponseForbidden(
        loader.render_to_string(
            template_name=template_name, context=context, request=request,
        )
    )
Default 403 handler.

    Templates: `403.html`
    Context:
        request_path
            The path of the requested URL (e.g., '/app/pages/bad_page/')
Default 403 handler.
Default 403 handler .
def permission_denied(request, template_name=None, extra_context=None):
    """
    Default 403 handler.

    Templates: `403.html`
    Context:
        request_path
            The path of the requested URL (e.g., '/app/pages/bad_page/')
    """
    if template_name is None:
        template_name = ("403.html", "authority/403.html")
    context = {
        "request_path": request.path,
    }
    if extra_context:
        context.update(extra_context)
    return HttpResponseForbidden(
        loader.render_to_string(
            template_name=template_name, context=context, request=request,
        )
    )
def permission_denied ( request , template_name = None , extra_context = None ) : if template_name is None : template_name = ( "403.html" , "authority/403.html" ) context = { "request_path" : request . path , } if extra_context : context . update ( extra_context ) return HttpResponseForbidden ( loader . render_to_string ( template_name = template_name , context = context , request = request , ) )