diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2012-06-22 15:43:57 +0200 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2012-06-22 15:46:49 +0200 |
| commit | 7f225880e4b7f846a1e910f6be0bce11f9a8d5ec (patch) | |
| tree | 87adb096ac428190871e58aed0d05b6ffb8db65b | |
| parent | 6bc1b222994301782bd80780bdeec8c4eb44631a (diff) | |
Corrected the `instance_dict` description for form wizards.
| -rw-r--r-- | django/contrib/formtools/wizard/views.py | 5 | ||||
| -rw-r--r-- | docs/ref/contrib/formtools/form-wizard.txt | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/django/contrib/formtools/wizard/views.py b/django/contrib/formtools/wizard/views.py index 4372c8aa6a..6222d1ddab 100644 --- a/django/contrib/formtools/wizard/views.py +++ b/django/contrib/formtools/wizard/views.py @@ -133,8 +133,9 @@ class WizardView(TemplateView): The key should be equal to the `step_name` in the `form_list` (or the str of the zero based counter - if no step_names added in the `form_list`) - * `instance_dict` - contains a dictionary of instance objects. This - is only used when `ModelForm`s are used. The key should be equal to + * `instance_dict` - contains a dictionary whose values are model + instances if the step is based on a ``ModelForm`` and querysets if + the step is based on a ``ModelFormSet``. The key should be equal to the `step_name` in the `form_list`. Same rules as for `initial_dict` apply. * `condition_dict` - contains a dictionary of boolean values or diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt index 7aafbe89f3..7d229a5d66 100644 --- a/docs/ref/contrib/formtools/form-wizard.txt +++ b/docs/ref/contrib/formtools/form-wizard.txt @@ -554,9 +554,8 @@ How to work with ModelForm and ModelFormSet WizardView supports :doc:`ModelForms </topics/forms/modelforms>` and :ref:`ModelFormSets <model-formsets>`. Additionally to :attr:`~WizardView.initial_dict`, the :meth:`~WizardView.as_view` method takes -an ``instance_dict`` argument that should contain instances of ``ModelForm`` and -``ModelFormSet``. Similarly to :attr:`~WizardView.initial_dict`, these -dictionary key values should be equal to the step number in the form list. +an ``instance_dict`` argument that should contain model instances for steps +based on ``ModelForm`` and querysets for steps based on ``ModelFormSet``. Usage of ``NamedUrlWizardView`` =============================== |
