Example #1
0
 def admin_group_edit(self):
     '''
     admin group page
     :return: template
     '''
     id = self.data.get_request_parameter("km_group_edit_id");
     self.result['menu_list'] = get_menu_list()
     self.result['group'] = KMGroup.get(id)
Example #2
0
 def admin_group_edit(self):
     '''
     admin group page
     :return: template
     '''
     id = self.data.get_request_parameter("km_group_edit_id")
     self.result['menu_list'] = get_menu_list()
     self.result['group'] = KMGroup.get(id)
     self.result['groups'] = KMGroup.all()
Example #3
0
 def save_group(cls, data):
     id = data.get_request_parameter("id")
     delete = data.get_request_parameter("delete", default=None)
     if delete is None:
         group = KMGroup.get(id)
         group.set_data(data)
         group.save()
     else:
         KMGroup.delete_by_id(id)
Example #4
0
 def admin_group_save(self):
     '''
     admin group page
     :return: template
     '''
     id = self.data.get_request_parameter("id")
     delete = self.data.get_request_parameter("delete", default=None)
     if delete is None:
         group = KMGroup.get(id)
         group.set_data(self.data)
         group.save()
     else:
         KMGroup.delete_by_id(id)
     self.result['menu_list'] = get_menu_list()
     self.result['groups'] = KMGroup.all()
Example #5
0
 def admin_group_save(self):
     '''
     admin group page
     :return: template
     '''
     id = self.data.get_request_parameter("id");
     delete = self.data.get_request_parameter("delete", default=None);
     if delete is None:
         group = KMGroup.get(id)
         group.set_data(self.data)
         group.save()
     else:
         KMGroup.delete_by_id(id)
     self.result['menu_list'] = get_menu_list()
     self.result['groups'] = KMGroup.all()