2👍
You can use the related_name
when declaring a M2M relationship:
class User(models.Model):
name = models.CharField(max_length=40)
following = models.ManyToManyField(Company, related_name='followers')
Then, you can query it using:
>>> Company.objects.exclude(followers=None)
Source:stackexchange.com