Previous topic

Step

This Page

WizardState

class merlin.wizards.utils.WizardState(*args, **kwargs)[source]

This class provides the ability for a SessionWizard to keep track of the important state of a multi-step form. Instead of keeping track of the state through <input type="hidden"> fields, it subclasses the python UserDict object and stores its data in the properties steps,``current_step`` and form_data.

New in version 0.1.

Parameters:
  • steps – A list of the Step objects that provide the sequence in which the forms should be presented to the user.
  • current_step – The current Step that the user is currently on.
  • form_data – A dict of the cleaned form data collected to this point and referenced using the Step‘s slug as the key to the dict