django model returning multiple values -


i have convert of code django php

here sample code:

def loadproduct(id=0)   if id==0:       product=baseproduct.products.all()[0];   else:        product = baseproduct.objects.get(id=id);   color = product.color   images = color.images.all();   return {'product':product, 'color':{'color':color, 'images':images}} 

now have basic knowledge of django..
not able understand return type in this...

can 1 me on this...

the method returning dictionary, equivalent associative array in php.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -