Annotate queryset with a boolean from ManyToMany relation

后端 未结 0 1516
無奈伤痛
無奈伤痛 2021-02-07 10:15

Lets say I have a Book model like this:

class Book(models.Model)
    title = models.Charfield(...)
    likes = models.ManyToMany(User, related_name=&         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题