def __call__(self, *params, **keywords): """Override to replace the SDBResponseError with a BadRequest error""" try: return RequestHandler.__call__(self, *params, **keywords) except SDBResponseError, e: raise BadRequest("Invalid Query", description=str(e))
def __init__(self, env, config): """Set up and fetch the routes for the first time""" RequestHandler.__init__(self, env, config)
def __init__(self, env, config): RequestHandler.__init__(self, env, config) db_class_name = self.config.get('db_class', None) if db_class_name: self.db_class = find_class(db_class_name) xmlize.register(self.db_class)