def make_403_error(message, realm='CIOC RPC'): error = HTTPForbidden() error.content_type = "text/plain" error.text = message return error
def make_403_error(message, realm="CIOC RPC"): error = HTTPForbidden() error.content_type = "text/plain" error.text = message return error
def forbidden(request): response = HTTPForbidden() response.content_type = 'application/json' with open(path('forbidden.json')) as msg: response.text = msg.read() return response