0
我有一個產品列表。我想獲得它所關聯的類別(類別)。 我做了什麼是:如何獲取Django Osacr產品的類別?
pro = [] #holds list of all the products
for p in pro:
for procat in p.get_categories():
print(procat)
,但它與錯誤返回:
'ManyRelatedManager' object is not iterable
我從這裏DJANGO OSCAR