Iterate forms with for loop

31 views
Skip to first unread message

Kamal Kaur

unread,
Aug 21, 2014, 5:33:11 AM8/21/14
to django...@googlegroups.com
I'm iterating multiple forms for all the instances of a table in the
template using for loop.

But only the last form is being considered and it saves the data from
last form only. I'm not getting how to differentiate these forms and
save data, from every field and form, into the database.

Here is my code:

Template: http://paste.ubuntu.com/8104842/
View: http://paste.ubuntu.com/8104734/
Forms: http://paste.ubuntu.com/8104801/
Models: http://paste.ubuntu.com/8104814/

Am I doing it wrong or missing something important?

--
Kamaljeet Kaur

Daniel Roseman

unread,
Aug 21, 2014, 7:10:05 AM8/21/14
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages