Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30738 closed Cleanup/optimization (fixed)

Misleading multiwidget template example.

Reported by: Emmanuel Cazenave Owned by: Daria Kolodzey
Component: Documentation Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In https://docs.djangoproject.com/en/2.2/ref/forms/widgets/#django.forms.MultiWidget.get_context the template given as an example includes the multiwidget template instead of including its sub-widget templates.

Instead of :

{% for subwidget in widget.subwidgets %}
    {% include widget.template_name with widget=subwidget %}
{% endfor %}

there should be :

{% for subwidget in widget.subwidgets %}
    {% include subwidget.template_name with widget=subwidget %}
{% endfor %}

Change History (6)

comment:1 by Mariusz Felisiak, 5 years ago

Easy pickings: set
Summary: Misleading multiwidget template exampleMisleading multiwidget template example.
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Thanks for the report. Agreed, this typo should be fixed.

comment:2 by Daria Kolodzey, 5 years ago

Owner: changed from nobody to Daria Kolodzey
Status: newassigned

comment:3 by frnhr, 5 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 3f8ee58c:

Fixed #30738 -- Fixed typo in docs/ref/forms/widgets.txt.

Thanks Emmanuel Cazenave for the report.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 11cdfb34:

[2.2.x] Fixed #30738 -- Fixed typo in docs/ref/forms/widgets.txt.

Thanks Emmanuel Cazenave for the report.
Backport of 3f8ee58ccc5c55e62625ad797ddde05778fe1bec from master

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