I have a model (or actually 2 models, but the other is not that relevant)
class Foo(models.Model): ... bar = models.ForeignKey(Bar, ... )
foo_queryset = Foo.objects.filter(attr=value) referenced_bars = Bar.objects.filter(id__in=foo_queryset.values('bar_id'))