James Gardner: Home > Work > Code > Wizard > 0.1.0 > API Documentation

Wizard v0.1.0 documentation

API Documentation

Tools for storing form data for multi-page forms known as Wizards.

wizard.CKRemoveLaterSteps(steps)
This pre_validator needs to: * remove any fields associated with steps later than the current one and purge them from the wizard store * ensure that values for each of the steps prior to the current one are validated * The whole wizard is treated as a single namespace so there is no separation into steps. Which field is treated as being associated with which step is entirely up to the validators. As long as they validate it doesn’t matter what extra fields are passed to them or from which step. This means when the wizard is being refactored, data from subsequent steps can still populate fields from earlier steps.
exception wizard.Completed(wizard)
exception wizard.Expired(wizard)
exception wizard.InvalidHash(wizard)
exception wizard.InvalidWizard(wizard)
exception wizard.NoSuchWizard
exception wizard.NoWizardInformation
exception wizard.WizardCaptchaNeeded(wizard)
wizard.generate_hash(flow, id, secret)
wizard.model_wizard_complete(flow, wizard_id)
Complete the wizard, removing all the old keys but leaving the accessed time untocuhed.
wizard.model_wizard_delete(flow, wizard_id, later_steps=None, types=None)
wizard.model_wizard_dump_fields(flow, wizard_id, types=None)
wizard.model_wizard_expire(flow, wizard_id)
Expire the wizard, removing all the old keys but leaving the accessed time untocuhed.
wizard.model_wizard_get_and_check(flow, wizard_id, hash, allowed_failures)
wizard.model_wizard_get_fields(flow, wizard_id, types=None)
wizard.model_wizard_insert(flow, wizard_id, values)
wizard.model_wizard_insert_private(flow, wizard_id, values)
wizard.model_wizard_insert_public(flow, wizard_id, values)
wizard.model_wizard_migrate(flow, from_wizard_id, to_wizard_id)
wizard.model_wizard_new(flow, name, expires=432000, status=1, accessed=None, secret=None, add_to_flow=True)
wizard.model_wizard_purge_expired(flow)
wizard.model_wizard_update(flow, wizard_id, values)
wizard.wizard_decorator(get_keys)

A decorator which takes a cookie name and extracts the wizard_id and hash from the cookie value and ensures they are both valid.

The cookie value is in the form wizard_id+wizard_hash

wizard.wizard_from_input(wizard_key, hash_key)
A decorator which takes a wizard ID and a hash, extracts them from query parameters and ensures they are both valid.
wizard.wizard_from_query(wizard_key, hash_key)
A decorator which takes a wizard ID and a hash, extracts them from query parameters and ensures they are both valid.
wizard.wizard_from_session(wizard_key, hash_key)
A decorator which takes a wizard ID and a hash, extracts them from the session and ensures they are both valid.
wizard.wizard_from_urlvars(wizard_key, hash_key)
A decorator which takes a wizard ID and a hash, extracts them from the URL and ensures they are both valid
wizard.wizard_validate_steps(steps, validator, start_dict)
James Gardner: Home > Work > Code > Wizard > 0.1.0 > API Documentation