Hi everyone,
I'm following the official django tutorials to learn Django by building the polls app...
Everything seemed great until chapter 3.
I had this link as part of my index template, which was working fine:
<li><a href="/polls/{{ poll.id }}/">{{ poll.question }}</a></li>however, this is hardcoded and the tutorial suggested a better way was to use:
<li><a href="{% url 'detail' poll.id %}">{{ poll.question }}</a></li>so that you'll be better of when dealing with huge number of templates and u have to make changes to the url.
Since I made the above change I get the following errors when I run the app:
| Exception Type: | NoReverseMatch |
|---|
| Exception Value: | Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found. |
|---|
Usually I could easily read where the error is coming from and deal with it but in this case I can't spot the cause of the error hence I'm unable to progress with my study.
Any help will be greatly appreciated.