[Django]-How can I seed information for a form based on a previous form?

2👍

The key is SessionWizardView… This is in the development branch of Django and won’t be released until 1.4. You can of course download the development branch and use the SessionWizardView but this isn’t recommended for production code!

The older version of the forms wizard for 1.3 is documented here. It does much less (hence the new version) and basically passes everything around as hidden fields.

👤Chris

4👍

There is a backport of Django 1.4 wizards for older Django version:

https://github.com/stephrdev/django-formwizard

You should use this instead of Django 1.3 wizard which is deprecated in 1.4. Your port to Django 1.4 will be easier.

You can prepare your port to Django 1.4 like this if you want to:

try:
    # Django 1.4
    from django.contrib.formtools.wizard.views import SessionWizardView
except ImportError:
    # For older django version use formwizard backport
    from formwizard.views import SessionWizardView

Leave a comment