Opened 13 years ago

Closed 13 years ago

#17153 closed Cleanup/optimization (duplicate)

WizardView including media is not documented

Reported by: Bradley Ayers <bradley.ayers@…> Owned by: nobody
Component: contrib.formtools Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

With the old django-formtools, there was some example code for including media of the wizard which was something like this:

{% if wizard.form.forms %}
{% for form in wizard.form.forms %}
{{ form.media }}
{% endfor %}
{% else %}
{{ wizard.form.media }}
{% endif %}

This was actually misleading (and bad). From what I can tell the for loop appears to be there to handle formsets, however formsets always have the same forms in them, so printing the media for each form in a formset would just result in duplicate output.

Instead the example should have been:

{{ wizard.form.media }}

I'd like to see this documented in the Wizard form documentation (perhaps just in the "full template example" section).

Change History (1)

comment:1 by Bradley Ayers <bradley.ayers@…>, 13 years ago

Resolution: duplicate
Status: newclosed

I've incorporated this into #17152.

Note: See TracTickets for help on using tickets.
Back to Top