我有两个模型
class Market(Model):
title=models.Charfield()
class Product(Model):
title=Models.Charfield()
markets=ManyToMany(Market)
我想在我的视图中获取产品列表。我只想为每个市场购买一种产品。 如何做呢?
product_for_each_market_list=Products.objects.filter()# should be rather simple.. but i can't figure what to do
谢谢。