The new FormWizard allows FileFields to be added at any step of the form
The customforms code should play better with Django 1.4, once we update the entire codebase to it
I've migrated customforms to use the new FormWizard (see the customforms_formwizard_changes branch), and it now needs to be tested.
FormWizard (1.3) saves state between pages by adding previously submitted data as hidden HTML input tags in subsequent pages (which is why FileFields can't be added anywhere except the last page). FormWizard (1.4) saves state either in client-side cookies or server-side sessions (I've used sessions for now). Files are temporarily saved server-side using a Storage subclass (I've used django.core.files.storage.FileSystemStorage), and they're saved in the specified location once the entire form has been submitted and validated.
It seems to be working for me, and it'd be great if someone else could test this out as well. Also, any ideas for writing test-cases here?
Vishal's code resolving this issue has been merged and the code appears to work. I haven't thought about what tests should look like... custom forms in general is lacking tests, so I'll make a new ticket for that.
There are two major reasons for doing this-
FormWizard (1.3) saves state between pages by adding previously submitted data as hidden HTML input tags in subsequent pages (which is why FileFields can't be added anywhere except the last page). FormWizard (1.4) saves state either in client-side cookies or server-side sessions (I've used sessions for now). Files are temporarily saved server-side using a Storage subclass (I've used django.core.files.storage.FileSystemStorage), and they're saved in the specified location once the entire form has been submitted and validated.
It seems to be working for me, and it'd be great if someone else could test this out as well. Also, any ideas for writing test-cases here?