I have a model (or actually 2 models, but the other is not that relevant)

class Foo(models.Model):
    ...
    bar = models.ForeignKey(Bar,
        ...
    )

When I have a QuerySet of Foo:s, how do I get all the Bar instances that are referenced by that QuerySet?

Since I'm using MySQL, I can't do .distinct(['bar'])

Edit
Report