@requires_csrf_token
def page_not_found(request, template_name="errors/404.html"):
    context = RequestContext(request, {
        "STATIC_URL": settings.STATIC_URL,
        "request_path": request.path,
    })
    t = get_template(template_name)
    return HttpResponseNotFound(t.render(context))
Mimics Django's 404 handler but with a different template path.
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/core/views.py/page_not_found