django-subquery

Using Subquery to annotate a Count

Using Subquery to annotate a Count Question: Please help me I’ve been stuck on this for way too long 🙁 What I want to do: I have these two models: class Specialization(models.Model): name = models.CharField(“name”, max_length=64) class Doctor(models.Model): name = models.CharField(“name”, max_length=128) # … specialization = models.ForeignKey(Specialization) I would like to annotate all specializations in …

Total answers: 2