Opened 11 years ago

Closed 11 years ago

#22215 closed Uncategorized (fixed)

1.4 tutorial minor error

Reported by: vynce@… Owned by: nobody
Component: Documentation Version: 1.4
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

in: https://docs.djangoproject.com/en/1.4/intro/tutorial04/
toward the end,

    url(r'^(?P<pk>\d+)/$',
        DetailView.as_view(
            model=Poll,
            template_name='polls/detail.html')),

but then it says ... By default, the DetailView generic view uses a template called <app name>/<model name>_detail.html. In our case, it’ll use the template "polls/poll_detail.html". except that I think it won't, because the template_name argument was used.

Change History (1)

comment:1 by Baptiste Mispelon, 11 years ago

Resolution: fixed
Status: newclosed

Hi,

This is fixed from version 1.5 on (by commit b66a51ad545ac726ef98966cbc35ee7aefdff8cd), where it says (emphasis mine):

In our case, it would use the template "polls/poll_detail.html".

We usually don't backport commits that far but since it was an easy fix and 1.4 is still technically supported, I backported that commit.
The modification should show up online soon.

Thanks.

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