Skip to content

Commit 7f22588

Browse files
committed
Corrected the instance_dict description for form wizards.
1 parent 6bc1b22 commit 7f22588

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

django/contrib/formtools/wizard/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ def get_initkwargs(cls, form_list, initial_dict=None,
133133
The key should be equal to the `step_name` in the `form_list` (or
134134
the str of the zero based counter - if no step_names added in the
135135
`form_list`)
136-
* `instance_dict` - contains a dictionary of instance objects. This
137-
is only used when `ModelForm`s are used. The key should be equal to
136+
* `instance_dict` - contains a dictionary whose values are model
137+
instances if the step is based on a ``ModelForm`` and querysets if
138+
the step is based on a ``ModelFormSet``. The key should be equal to
138139
the `step_name` in the `form_list`. Same rules as for `initial_dict`
139140
apply.
140141
* `condition_dict` - contains a dictionary of boolean values or

docs/ref/contrib/formtools/form-wizard.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,8 @@ How to work with ModelForm and ModelFormSet
554554
WizardView supports :doc:`ModelForms </topics/forms/modelforms>` and
555555
:ref:`ModelFormSets <model-formsets>`. Additionally to
556556
:attr:`~WizardView.initial_dict`, the :meth:`~WizardView.as_view` method takes
557-
an ``instance_dict`` argument that should contain instances of ``ModelForm`` and
558-
``ModelFormSet``. Similarly to :attr:`~WizardView.initial_dict`, these
559-
dictionary key values should be equal to the step number in the form list.
557+
an ``instance_dict`` argument that should contain model instances for steps
558+
based on ``ModelForm`` and querysets for steps based on ``ModelFormSet``.
560559

561560
Usage of ``NamedUrlWizardView``
562561
===============================

0 commit comments

Comments
 (0)