storage.py

This module contains a storage model definition used by apps.questionnaire.wizards.QuestionnaireWizard to temporarily store all filled in information from the questionnaires.

Class definitions:

class apps.questionnaire.storage.DatabaseStorage(*args, **kwargs)[source]

Bases: formtools.wizard.storage.base.BaseStorage

Wizard database storage class stores the temporary data of a wizard in a database instead of the session or a cookie

init_data()[source]

Override the method to append the unclean_data key

get_unclean_data(step)[source]

Get the unclean data for a step

Args:
  • step: the step key
Returns:
The values in dict format
set_unclean_data(step, unclean_form_data)[source]

Set the unclean data for a step

Args:
  • step: The step key to set the unclean_data for
  • unclean_form_data: the unclean data from a form
load_data()[source]

Load the data from the database

Returns:
A dict with the loaded data
update_response(response)[source]

Stores the data, automatically called before the response is sent to the client

Args:
  • response: the response instance