Opened 3 months ago

Closed 3 months ago

#35345 closed Bug (invalid)

Bug in Tutorial 3 of Documentation

Reported by: nima karimian Owned by: nima karimian
Component: Documentation Version: 5.0
Severity: Normal Keywords: Template, URL conf, Views
Cc: nima karimian Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

### Bug in Tutorial part 3 of the Documentation
referencing from Tutorial part 1:
since we have created a new polls app in out mysite project we configured the mysite.url like this

urlpatterns = [
    path("polls/", include("polls.urls")),

so when we render the page polls/index.html or namely, the index view in our poll app the base url would be localhost/polls/
and with having this in our template : <li><a href="/polls/{{}}/">
the GENERATED link would be : localhost/polls/polls/question_id which raises an error since we didn't describe such pattern in our file in polls app

urlpatterns = [

Change History (2)

comment:1 by nima karimian, 3 months ago

Has patch: set
Owner: changed from nobody to nima karimian
Status: newassigned

comment:2 by Tim Graham, 3 months ago

Description: modified (diff)
Resolution: invalid
Status: assignedclosed

If the link went to /polls/polls/question_id, I think you may have put <a href="polls/{{}}/"> (without a slash before polls) in your template.

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