Writing your first Django app, part 4: last part missing information on how to change "return HttpResponseRedirect...."
|Reported by:||Rob van der Linde||Owned by:||Jacob|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Hi, I am new to Django and I just went all the way through tutorials parts 1 .. 4 of the latest SVN documentation. I also used the latest SVN of Django.
Everything went smoothly, however I think I noticed one thing missing in the documentation.
The last few paragpraphs of part 4 get you to changeover what you have written so far to generic views. Everything works after the changeover, except the HttpResponseRedirect just after you post a poll generates a NoReverseMatch exception, which it did not before the changeover to generic views. I had a real careful look at the documentation, and I believe it may be missing one piece of information, on changing the following line in your poll view in the vote() method:
return HttpResponseRedirect(reverse('mysite.polls.views.results', args=(p.id,)))
As far as I can see, the documentation does not mention changing this line, but I am sure this is where it is going wrong now. It generates a NoReverseMatch exception. I believe this could be a missing piece of information in the documentation