AND THE ANSWER IS :
[...]
if formset.is_valid():
# do something with the formset.cleaned_data
cd = formset.cleaned_data
for i in range(len(cd)):
cd[i]['answer'] = cd[i]['x'] + cd[i]['y']
formset = ArticleFormSet(initial=cd)
[...]
--
You received this message because yo
Getting out of the bed, I partly found why this new problem occurs.
This is because the following HTML line:
Becomes this after the first submit by the browser:
Then I loose "id_form-0" substring and the corrupted HTML cannot work
twice.
This seem encouraging, but now I need to sleep. I will p
I made some progress replacing the defective line with:
formset.forms[i] = ArticleForm(cd[i])
Mysteriously: it work when the browser send the first submit. But the
form becomes empty if I submit twice.
Here is the template:
Test
Test
{% if form.errors %}
Good evening,
I stick with the above error message in the following example. I
looked at each
attributes of the object (Base_fields, etc.), but I can't find how I
to assign the new dataset back into the form.
def manage_articles(request):
ArticleFormSet = formset_factory(ArticleForm)
if r
4 matches
Mail list logo