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
Post a Comment