[Fixed]-Values of a dict in a dropdown django

1👍

You’re looking for values_list:

>>> allmarketplaces = SellerMarketplaces.objects.filter(seller_id=seller).values_list('mk_id__marketplace', flat=True)
>>> print allmarketplaces
['Flipkart', 'Snapdeal']

0👍

Try this,

for i in range(len(allmarketplaces)):
   print allmarketplaces[i]['mk_id__marketplace']

Leave a comment