diff --git a/django/contrib/formtools/templates/formtools/wizard/wizard_form.html b/django/contrib/formtools/templates/formtools/wizard/wizard_form.html index b98e58d1c7..fe755222ed 100644 --- a/django/contrib/formtools/templates/formtools/wizard/wizard_form.html +++ b/django/contrib/formtools/templates/formtools/wizard/wizard_form.html @@ -1,5 +1,6 @@ {% load i18n %} {% csrf_token %} +{{ wizard.form.media }} {{ wizard.management_form }} {% if wizard.form.forms %} {{ wizard.form.management_form }} @@ -11,7 +12,7 @@ {% endif %} {% if wizard.steps.prev %} - - + + {% endif %} diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt index ba2f4e8ae5..aadd7d276f 100644 --- a/docs/ref/contrib/formtools/form-wizard.txt +++ b/docs/ref/contrib/formtools/form-wizard.txt @@ -160,8 +160,9 @@ latter one allows you to use a different template for each form. This template expects a ``wizard`` object that has various items attached to it: -* ``form`` -- The :class:`~django.forms.Form` instance for the current - step (either empty or with errors). +* ``form`` -- The :class:`~django.forms.Form` or + :class:`~django.forms.formset.BaseFormSet` instance for the current step + (either empty or with errors). * ``steps`` -- A helper object to access the various steps related data: @@ -186,9 +187,13 @@ Here's a full example template: {% extends "base.html" %} + {% block head %} + {{ wizard.form.media }} + {% endblock %} + {% block content %}
Step {{ wizard.steps.step1 }} of {{ wizard.steps.count }}
- {% endblock %}