following the discussion
http://groups-beta.google.com/group/django-developers/browse_thread/thread/d500c47eb51353e3/2e61103c43fba506?
I have added some more flexibility and cleaned up the code a bit (and added comments ;) ).
Features:
- just subclass the wizard.Wizard class, override the done() method and you are done - you can just point your urls.py to MyWizard( [list, of, newform, classes] ) and wait...
- data from previous steps are stored in hidden fields and passed back and forth (do not try and use this for uploading files in any, but the last step of the form ! ), NO data is stored on the server
- security hash is calculated once the form is validated ( thus you avoid validating each form every time and can detect manual tampering with the POST data)
If that's not enough you can (by overriding/extending some methods):
- create the list of forms dynamically (you still have to supply at least one form, so that the wizard has something to start with) - do this in process_step() (just append to self.form_list ) -- see the last email for example
- use a custom template name for every step ( get_template() )
- override the rendering method for custom rendering ( render_template() )
- override the mechanism that handles the step counter - by default that is in POST['wizard_step'] , but you can put it in your URL, GET or even session if you wish ( parse_params() )
- provide extra_context (from urls.py, process_step(), parse_params() etc...)
The only thing that is pretty much hardcoded is the use of POST throughout the wizard.
I am using the code (not the newest version, but I only made cosmeticall changes since) for some time now and everything works.
Once I get some feedback and a few people try it out, I will put together some documentation.