python - How to clone an object and all related fields in Django? -


i trying clone object instance , related fields in django.

i started writing script:

from shop.models import shop  shop = shop.objects.get(pk=323232) menus = shop.menu_set.all() menu =  menus[0] print menu.category_set.all() 

i can see category list, cannot iterate. wrong?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -