[Answered ]-Signals in django. Profile does not exist

1👍

You are adding a string instead of a user instance to the many-to-many field of your profile, so your profile is not being created.

This line in your signals.py

profile.followers.add('1')

should be

profile.followers.add(instance)

but that would make a user follow himself, I don’t know if that is the functionality you want, if not you should probably remove it from the signals

Leave a comment