def get(self): if users.is_current_user_admin(): key = self.request.get('key') datamodel.drop_serie(key) self.redirect('/search') else: self.reject()
def ajaxDropSerie(self, *args): keys = args[0] if users.is_current_user_admin(): for key in keys: datamodel.drop_serie(key)