[Django]-How to implement followers/following in Django

29👍

Set symmetrical to False in your Many2Many relation:

follows = models.ManyToManyField('self', related_name='follows', symmetrical=False)
👤mouad

17👍

In addition to mouad’s answer, may I suggest choosing a different *related_name*: If Mark follows John, then Mark is one of John’s followers, right?

Leave a comment