def get_table_info(self): """ 获取table表 """ data = deal_fields_Table(self._meta.fields, True, True, 3, None, None, None) return data
def get_table_info(self): """ 获取table表 """ data = deal_fields_Table(self._meta.fields, True, True, 2, None, None, None) data['field_select_kv'].append( {"idc": [[row.id, row.cname] for row in Idc.objects.all()]}) return data
def get_table_info(self): """ 获取table表 """ data = deal_fields_Table(self._meta.fields, True, True, 2, None, None, None) data["fields"]["model"] = "对象" data["field_search"].remove("user") data["field_show_order"] = ["id","time_added","user","action_flag","model","message"] data['field_select_kv'].append({"content_type": [[row.id, row.model] for row in ContentType.objects.order_by('-id')]}) return data
def get_table_info(self): """ 获取table表 """ m2mField = [{ "field_name": "urls", "verbose_name": "url权限", "required": False, "show": True }] data = deal_fields_Table(self._meta.fields, True, True, 2, m2mField, None, None) data['field_select_kv'].append({ "urls": [[row.id, row.url] for row in Url.objects.filter(user_type='customuser')] }) data['fields']["users"] = "用户列表" data['field_add_novis'] = ['users', 'id'] data['field_show_order'].append("users") return data
def get_table_info(self): """ 获取table表 """ m2mField = [{ "field_name": "roles", "verbose_name": "角色", "required": True, "show": False }] force_fields = [ 'id', 'username', 'name', 'email', 'phone', 'roles', 'date_joined', 'is_active' ] data = deal_fields_Table(self._meta.fields, True, True, 2, m2mField, force_fields, None) data['field_select_kv'].append({ "roles": [[row.id, row.cname] for row in Role.objects.order_by("-id")] }) return data