summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/formtools/form-wizard.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt
index bcffb7716b..f8d46fd291 100644
--- a/docs/ref/contrib/formtools/form-wizard.txt
+++ b/docs/ref/contrib/formtools/form-wizard.txt
@@ -245,6 +245,13 @@ wizard's ``as_view()`` method takes a list of your
(r'^contact/$', ContactWizard.as_view([ContactForm1, ContactForm2])),
)
+.. versionchanged:: 1.6
+
+You can also pass the form list as a class attribute named ``form_list``.
+
+ class ContactWizard(WizardView):
+ form_list = [ContactForm1, ContactForm2]
+
.. _wizard-template-for-each-form:
Using a different template for each form
@@ -295,6 +302,14 @@ The ``urls.py`` file would contain something like::
(r'^checkout/$', OrderWizard.as_view(FORMS, condition_dict={'cc': pay_by_credit_card})),
)
+.. versionchanged:: 1.6
+
+The ``condiction_dict`` can be passed as attribute for the ``as_view()``
+method or as a class attribute named ``condition_dict``.
+
+ class OrderWizard(WizardView):
+ condition_dict = {'cc': pay_by_credit_card}
+
Note that the ``OrderWizard`` object is initialized with a list of pairs.
The first element in the pair is a string that corresponds to the name of the
step and the second is the form class.
@@ -550,6 +565,11 @@ Providing initial data for the forms
The ``initial_dict`` can also take a list of dictionaries for a specific
step if the step is a ``FormSet``.
+ .. versionchanged:: 1.6
+
+ The ``initial_dict`` can also be added as a class attribute named
+ ``initial_dict`` to avoid having the initial data in the ``urls.py``.
+
.. _wizard-files:
Handling files