learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
84 stars 57 forks source link

Update customforms to use Django 1.4's FormWizard (Testing needed) #336

Closed vdugar closed 12 years ago

vdugar commented 12 years ago

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?

pricem commented 12 years ago

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.