Skip to content

Commit

Permalink
Tweaked the formwizard docs a bit more.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16906 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
ramiro committed Sep 26, 2011
1 parent 11c1e61 commit 0febe3b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions docs/ref/contrib/formtools/form-wizard.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -149,10 +149,13 @@ Creating templates for the forms
Next, you'll need to create a template that renders the wizard's forms. By Next, you'll need to create a template that renders the wizard's forms. By
default, every form uses a template called default, every form uses a template called
:file:`formtools/wizard/wizard_form.html`. You can change this template name :file:`formtools/wizard/wizard_form.html`. You can change this template name
by overriding either the :attr:`~WizardView.template_name` attribute or the by overriding either the
:meth:`~WizardView.get_template_names()` method, which is documented in the :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` attribute
:class:`~django.views.generic.base.TemplateResponseMixin` documentation. or the
This hook also allows you to use a different template for each form. :meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names()`
method, which are documented in the
:class:`~django.views.generic.base.TemplateResponseMixin` documentation. The
latter one allows you to use a different template for each form.


This template expects a ``wizard`` object that has various items attached to This template expects a ``wizard`` object that has various items attached to
it: it:
Expand Down Expand Up @@ -556,12 +559,12 @@ How to work with ModelForm and ModelFormSet


.. attribute:: WizardView.instance_dict .. attribute:: WizardView.instance_dict


WizardView supports :class:`~django.forms.ModelForm` and WizardView supports :doc:`ModelForms </topics/forms/modelforms>` and
:class:`~django.forms.ModelFormSet`. Additionally to the ``initial_dict``, the :ref:`ModelFormSets <model-formsets>`. Additionally to
:meth:`~WizardView.as_view` method takes a ``instance_dict`` argument that :attr:`~WizardView.initial_dict`, the :meth:`~WizardView.as_view` method takes
should contain instances of ``ModelForm`` and ``ModelFormSet``. Similarly to an ``instance_dict`` argument that should contain instances of ``ModelForm`` and
:attr:`~WizardView.initial_dict`, thos dictionary key values should be equal to ``ModelFormSet``. Similarly to :attr:`~WizardView.initial_dict`, these
the `step_name` in the `form_list`. dictionary key values should be equal to the step number in the form list.


Usage of NamedUrlWizardView Usage of NamedUrlWizardView
=========================== ===========================
Expand Down

0 comments on commit 0febe3b

Please sign in to comment.