Opened 18 years ago
Closed 18 years ago
#5616 closed (worksforme)
Writing your first Django app, part 4
| Reported by: | anonymous | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
i could be wrong but i am pretty sure the last line of code specified in the tutorial (Writing your first Django app, part 4):
return HttpResponseRedirect(reverse('poll_results', args=(p.id,)))
forces the browser to redirect to
http://127.0.0.1:8000/objects/1/vote/
instead of
http://127.0.0.1:8000/polls/1/vote/
Note:
See TracTickets
for help on using tickets.
Actually try it out with the code supplied in the tutorial. The URLs for the
pollsapplication are rooted under/polls/, not/objects/;reverseworks based on what's in the URLConf, so it will return/polls/1/vote/.