29👍
✅
Set symmetrical to False in your Many2Many relation:
follows = models.ManyToManyField('self', related_name='follows', symmetrical=False)
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?
- [Django]-Celery discover tasks in files with other filenames
- [Django]-How can I get MINIO access and secret key?
- [Django]-Django index page best/most common practice
Source:stackexchange.com