[Answered ]-How can I access to data stored in a ManyToMany related table in Django?

1👍

See if this works for you.

follow_object = Follow.objects.filter(user=user)
followers_of_user = follow_object.follow.all()

I think the problem is that the user object does not have a user.follows function. You have created a seperate table in the database with that relationship data. I’m sure there’s a better way of doing it but that’s what I have done with something similar in my project.

Leave a comment