I have a model (or actually 2 models, but the other does not fit)
class Foo(models.Model): ... bar = models.ForeignKey(Bar, ... )
When I have a QuerySet from Foo : s, how do I get all Bar instances referenced by this QuerySet?
Since I use MySQL, I can not do .distinct(['bar'])
source share