4
By default, many-to-many relationships on self are symmetrical. If you don’t want this, set symmetrical
to False:
followings = models.ManyToManyField('self', blank=True, symmetrical=False)
See the docs
3
Just set related_name=”followed_by” for the many to many field. That would assign the reverse mapping to followed_by
followings = models.ManyToManyField('self', blank=True, symmetrical=False, related_name='followed_by')
- [Django]-Python Webshop for Retailers / Distributors
- [Django]-How to create different objects depending on input?
- [Django]-Django – cannot get loaddata to work
Source:stackexchange.com