12345678910111213141516171819202122232425262728293031323334353637383940 |
- # def digui(n):
- # a = []
- # b = {}
- # if n.bar_set.all():
- # c = {}
- # b['authName'] = n.authName
- # b['icon'] = n.icon
- # b['partment_id'] = []
- # a.append(b)
- # for level_val in n.bar_set.all():
- # c['authName'] = level_val.authName
- # c['icon'] = level_val.icon
- # c['partment_id'] = []
- # b['partment_id'].append(c)
- # # print(b['partment_id'])
- # c = {}
- # digui(level_val)
- # print(a)
- # b = {}
- # c = {}
- # # # print(n.authName)
- # # b['authName'] = n.authName
- # # b['icon'] = n.icon
- # # b['partment_id'] = n.partment_id
- # # a.append(b)
- # return a
- # def display(foods):
- # display_list = []
- # childrens = []
- # for food in foods:
- # display_list.append({'id':food.id,'authName':food.authName,'icon':food.icon,'partment_id':food.partment_id,'childrens':childrens})
- # children = food.children.all()
- # if len(children) > 0:
- # # print(children,str(itm))
- # childrens.append(display(food.children.all()))
- # childrens = []
- # return display_list
- if 3>3-1:
- print(1)
|