def error(request): raise PublishError(public_msg="Oops, an error occured.")
def __init__(self, allowed, public_msg=None, private_msg=None): PublishError.__init__(self, public_msg, private_msg) self.allowed = allowed
def format(self): response = quixote.get_response() response.set_header('Allowed', ', '.join(self.allowed)) return PublishError.format(self)
def publish_error(request): raise PublishError(public_msg="Publishing error raised by publish_error")