django - Creating multiple instances of the same model from one form -


so have model member:

class member(models.model):     first_name = models.charfield(max_length = 15)     last_name = models.charfield(max_length = 15)     house = models.foreignkey('house', null = true)     created_on = models.datetimefield('created on')     user = models.onetoonefield(user, null = true) 

and form create model:

class memberform(forms.form):     first_name = forms.charfield()     last_name = forms.charfield()     email_address = forms.emailfield() 

my app works create house , specify number of members in house. that's far have working, continue new page displays appropriate number of forms (one each member), , creates member instance each supplied data. i'm confused how access data each form, since they're technically in same html form. more how identify email field goes first name field , on. appreciated, thanks.

this formsets for.

note creating member memberform easier if used model forms (and model formsets).


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -