I could fix part of my problem: The formtools formwizard doc states for the 
us of modelformsets: 

'WizardView supports ModelForms 
<http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#module-django.forms.models>
 
and ModelFormSets 
<http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#model-formsets>. 
Additionally to initial_dict 
<http://django-formtools.readthedocs.org/en/latest/wizard.html#formtools.wizard.views.WizardView.initial_dict>,
 
the as_view() 
<http://django-formtools.readthedocs.org/en/latest/wizard.html#formtools.wizard.views.WizardView.as_view>
 
method takes an instance_dict argument that should contain model instances 
for steps based on ModelForm and querysets for steps based on ModelFormSet.' 


For me this does not make to much sense: Why should I specify model 
instances / querysets for steps basend on ModelForm / ModelFormSet? In the 
case of ModelFormSet, FormView seems to prepopulate the formset with all 
model instances from the database, causing half of my error above.
Why has this behavior been chosen? I don't get it...

Nevertheless, to fix this I added 'instance_dict = {'third': 
Task.objects.none()}' to the JobWizard.

Still half of the error persists: Upon submitting the final 
formwizard-form, the *last* form in the TaskFormSet produces a 
'RelatedObjectDoesNotExist' error for Step ('Task has no step'), even 
though it was preset by 'get_form_initial'. All other forms are saved 
without a problem. So what is special about the last form in the formset? 
Ugh...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ee0855ff-cc96-4cc4-89bb-553e99df4044%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to