Official Django tutorial 3: Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found.
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.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c33a669a-ff0e-44cf-b95a-93296e71150c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home