I want to send variables to a form in my Django project so that my form's save method associates the correct object with the foreign key in the model.
I tried setting it in the init method, but that doesn't seem to work.
Here is my Form's init:
def __init__(self, rsvp, max_guests=2, *args, **kwargs):
super(RSVPForm, self).__init__(*args, **kwargs)
self.rsvp = rsvp
self.max_guests = rsvp.max_guests