I'm working on a project where a user can add an event, and another user can enroll themself in that event. I want to add a user's name to the list whenever they enroll in the event.
My model:
class Event(models.Model):
Topic = CharField
participants = # want a field here
# which can store
# multiple items
# that is the name
# of the user. So when
# the user
# registers a
# method appends
# the user name in this list.
You'll want a ManyToManyField to link users to Events:
You can also add a separate "through" table to add extra information about participations: