From 28a686a0b75e118a4a24462f3b3d31c8231f010a Mon Sep 17 00:00:00 2001 From: Vishal Lal Date: Wed, 2 Apr 2014 06:14:47 +0000 Subject: [PATCH] [1.7.x] Fixed #22372 -- Improved description of WizardView.get_context_data(). Thanks simon29 for the report. Backport of a8e2ec0e82 from master --- django/contrib/formtools/wizard/views.py | 3 +-- docs/ref/contrib/formtools/form-wizard.txt | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/django/contrib/formtools/wizard/views.py b/django/contrib/formtools/wizard/views.py index 1b297838be..77cf80ac8b 100644 --- a/django/contrib/formtools/wizard/views.py +++ b/django/contrib/formtools/wizard/views.py @@ -538,8 +538,7 @@ class WizardView(TemplateView): context variables are: * all extra data stored in the storage backend - * `form` - form instance of the current step - * `wizard` - the wizard instance itself + * `wizard` - a dictionary representation of the wizard instance Example: diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt index c8caed746a..62f0eedd05 100644 --- a/docs/ref/contrib/formtools/form-wizard.txt +++ b/docs/ref/contrib/formtools/form-wizard.txt @@ -405,8 +405,13 @@ Advanced ``WizardView`` methods The default template context variables are: * Any extra data the storage backend has stored - * ``form`` -- form instance of the current step - * ``wizard`` -- the wizard instance itself + * ``wizard`` -- a dictionary representation of the wizard instance with the + following key/values: + + * ``form`` -- :class:`~django.forms.Form` or + :class:`~django.forms.formsets.BaseFormSet` instance for the current step + * ``steps`` -- A helper object to access the various steps related data + * ``management_form`` -- all the management data for the current step Example to add extra variables for a specific step::