def admin_user(self): ''' admin user page :return: template ''' self.result['menu_list'] = get_menu_list() self.result['users'] = KMUser.all()
def admin_user(self): ''' admin user page :return: template ''' self.result['menu_list'] = get_menu_list() self.result['users'] = KMUser.all()
def admin_user_save(self): ''' admin user page :return: template ''' KMUserAdmin.save_user(self.data) self.result['menu_list'] = get_menu_list() self.result['users'] = KMUser.all()
def admin_user_save(self): ''' admin user page :return: template ''' id = self.data.get_request_parameter("id") delete = self.data.get_request_parameter("delete", default=None) if delete is None: user = KMUser.get(id) user.set_data(self.data) user.save() else: KMUser.delete_by_id(id) self.result['menu_list'] = get_menu_list() self.result['users'] = KMUser.all()
def admin_user_save(self): ''' admin user page :return: template ''' id = self.data.get_request_parameter("id"); delete = self.data.get_request_parameter("delete", default=None); if delete is None: user = KMUser.get(id) user.set_data(self.data) user.save() else: KMUser.delete_by_id(id) self.result['menu_list'] = get_menu_list() self.result['users'] = KMUser.all()