Opened 3 years ago

Closed 3 years ago

#21315 closed Bug (invalid)

Possible Error in Tutorial pt. 3

Reported by: andy@… 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: no UI/UX: no


Hello, I just lost about 30 minutes chasing down an error while walking through the tutorial. It's on the very last part of pt. 3 involving namespacing. (See pt 3 here:

It says to change the line to this:

<li><a href="{% url 'polls:detail' %}">{{ poll.question }}</a></li>

However, I was getting an error message: u"'polls" is not a registered namespace

After some googling, it looks like others are having the same trouble, and I was able to fix it by instead changing the line in question to this:

<li><a href="{% url polls:detail %}">{{ poll.question }}</a></li>

I'm only a beginner and am not familiar enough to have any clue why this makes a difference.

If there's any other information I can provide, feel free to let me know.


Change History (1)

comment:1 in reply to:  description Changed 3 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: invalid
Status: newclosed

The tutorial is correct as written. You've using the wrong version of the tutorial.

The documentation currently defaults to Django 1.5; you've logged the fact that you are using Django 1.4.

Django 1.5 marked the point at which a subtle change in URL tag syntax was interpreted; that syntax change was introduced slowly over a series of releases. However, it does mean that it's important that you use the version of the tutorial that matches your Django install.

You can address the problem by either following the tutorial that matches your installed version:

or updating your Django install to Django 1.5.

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