我想为多表继承做一个动态过滤器。
class Product(models.Model):
name ...
class Product1(Product):
color ...
class Product2(Product):
length ...
tags = ManyToManyField('tags.Tag')
如何过滤才不会导致异常“缺失字段”?
Product.objects.filter(***__color='11', ***__length='300', **__tags__pk__in=[1, 2])