5👍
✅
To delete ManyToMany relationships, use remove() instead of delete.
act.attendee.remove(attendee)
Also i suggest to change the naming conventions for better readability,
class Activity(models.Model):
attendees = models.ManyToManyField(Attendee, related_name="activities", null=True, blank=True)
So removing logic will be,
act.attendees.remove(attendee)
You can also remove using the reverse relationship,
attendee.activities.remove(act)
Source:stackexchange.com