我有两个模型,Posts和PostLikes。PostLikes包含一个Username列,该列与点赞的用户相关联。我想查询所有的帖子,但是添加一个属性来查找任何带有我可以动态传递的用户名的PostLike。")), "Liked"], // Right here I would like to see if there is a record in PostLikes for the Post.id, that"],
or
我有一个博客应用程序,用户可以添加新的帖子,任何用户都可以喜欢这篇文章。models.py title = models.CharField(max_length=60)
class PostlikeSerializer(serializers.ModelSerializer): model = PostLi