def METHOD_NAME(request, exception):
    ban = exception.ban
    request.frontend_context.update(
        {"MESSAGE": ban.get_serialized_message(), "CURRENT_LINK": "misago:error-banned"}
    )
    return render(request, "misago/errorpages/banned.html", {"ban": ban}, status=403)