Skip to main content

Simple session based form wizard for django applications.

Project description

django-simple-formwizard

Number of PyPI downloads

django-simple-formwizard is a simple session based form wizard for django applications.

Quickstart:

Install package:

$ pip install django-simple-formwizard

In views:

Define steps configuration:

MY_WIZARD_STEPS = [
    {'name': 'Step Mane',
     'url_name': 'url-to-step',
     'url_params': [list of url params],
     'anonymous_required': False},
    ...
]

Create wizard object

wizard = Wizard(request, MY_WIZARD_STEPS)

Forms initial data:

my_form = MyForm(initial=wizard.data.get('my_data', {}))

Setting data:

wizard.set_data({'my_data': my_form})

Example:

my_form = MyForm(initial=wizard.data.get('my_data', {}))

if request.method == 'POST':
    my_form = MyForm(request.POST)

    if my_form.is_valid():
        wizard.set_data({'my_data': my_form})
        return redirect_to_next_step

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-simple-formwizard-0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page