Opened 6 years ago

Closed 6 years ago

#20621 closed Bug (worksforme)

tutorial 04 imports polls namespace while within polls

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


Tutorial 4 (for Django 1.5) has update 'polls/detail.html' to contain a form which posts to

{% url 'polls:vote' %}

However 'polls/detail.html' is in the polls app/namespace (and so the identifier {{{polls}} is not defined) resulting in the error message:

u'polls' is not a registered namespace

removing polls: so that the URL reads

{% url 'vote' %}

fixes the issue.

Change History (2)

comment:1 Changed 6 years ago by anonymous

I just realized the documentation has the same issues in the definition of vote() in and also polls/results.html.

comment:2 Changed 6 years ago by Baptiste Mispelon

Resolution: worksforme
Status: newclosed


The namespacing of URLs is introduced at the end of part 3 [1].

Make sure you add namespace='polls' to the include call in the, and it should work (I've just tried it).



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