After fiddling around I think I found the syntax that seems to work
for my purposes:
if formset.is_valid():
for form in formset.forms:
tmpform = form.save(commit=False)
for field in form:
if not field.form.is_bound:
data = field.form.initial.get(field.name,
Hello,
I understand that Django won't let you save incomplete fields in a
single form created from a Model unless you do this:
tmpform = form.save(commit=False)
tmpform.foo = form.cleaned_data['foo']
tmpform.save()
So I want to do this kind of thing with forms in a formset - I am
tr
2 matches
Mail list logo