lianxi.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # def digui(n):
  2. # a = []
  3. # b = {}
  4. # if n.bar_set.all():
  5. # c = {}
  6. # b['authName'] = n.authName
  7. # b['icon'] = n.icon
  8. # b['partment_id'] = []
  9. # a.append(b)
  10. # for level_val in n.bar_set.all():
  11. # c['authName'] = level_val.authName
  12. # c['icon'] = level_val.icon
  13. # c['partment_id'] = []
  14. # b['partment_id'].append(c)
  15. # # print(b['partment_id'])
  16. # c = {}
  17. # digui(level_val)
  18. # print(a)
  19. # b = {}
  20. # c = {}
  21. # # # print(n.authName)
  22. # # b['authName'] = n.authName
  23. # # b['icon'] = n.icon
  24. # # b['partment_id'] = n.partment_id
  25. # # a.append(b)
  26. # return a
  27. # def display(foods):
  28. # display_list = []
  29. # childrens = []
  30. # for food in foods:
  31. # display_list.append({'id':food.id,'authName':food.authName,'icon':food.icon,'partment_id':food.partment_id,'childrens':childrens})
  32. # children = food.children.all()
  33. # if len(children) > 0:
  34. # # print(children,str(itm))
  35. # childrens.append(display(food.children.all()))
  36. # childrens = []
  37. # return display_list
  38. if 3>3-1:
  39. print(1)