我在Django项目中有以下模型:
class Accion(models.Model):
nombre = models.CharField(max_length=100,blank = True, null=True)
class Proyecto(models.Model):
titulo = models.CharField(max_length=100,blank = True, null=True)
acciones = models.ManyToManyField(Accion,blank = True, null=True,related_name="Proyectos")
我需要在reversed filter()查询中获取与Proyecto对象的id列表相关的所有Accion对象。 我试过了:
^{pr2}$但我得到了以下错误: proyectos_id\u in'是此函数的无效关键字参数
如何获取Accion objects queryset?谢谢
将行改为:
有关如何使用筛选器查询的详细信息,请参见Retrieving specific objects with filters。在
相关问题 更多 >
编程相关推荐