6👍
✅
They do the exact same thing.
A many-to-many relation consists of an intermediate table with a foreign key to both models. user.groups.add(group)
will create an entry in that table where the foreign keys point to the user
and group
instances. The same happens with group.user_set.add(user)
.
👤knbk
Source:stackexchange.com