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

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -