0
在多对多使用过滤器试图收集对象的集合:通过对象
set = [model1].objects.all().filter([model2]__in=[model3].[model2]_set)
但我得到一个
TypeError at [url]
'ManyRelatedManager' object is not iterable
当我试图做到这一点。模型2和模型3通过模型2中的ManyToMany字段相关联到第四个模型具有两个模型作为字段。
任何明显的解决方法?
烨,想通了这一点,你发布的权利之前。 – fox