[Django] #25724: Wrong path in index.html file [django tutorial]

6 views
Skip to first unread message

Django

unread,
Nov 10, 2015, 1:18:18 AM11/10/15
to django-...@googlegroups.com
#25724: Wrong path in index.html file [django tutorial]
-------------------------------+------------------------
Reporter: marq | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Keywords: index.html
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------
polls/templates/polls/index.html

{{{

{% if latest_question_list %}

<ul>
{% for question in latest_question_list %}
<li><a href="/polls/{{ question.id }}/">{{ question.question_text
}}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}

}}}

Tutorial 3
This line:

{{{
<li><a href="/polls/{{ question.id }}/">{{ question.question_text
}}</a></li>
}}}

should be replace with:

{{{
<li><a href="{{ question.id }}/">{{ question.question_text }}</a></li>
}}}


It cause a bug(doubled polls in path), which set path
/polls/polls/<question_id>

--
Ticket URL: <https://code.djangoproject.com/ticket/25724>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 10, 2015, 1:53:14 AM11/10/15
to django-...@googlegroups.com
#25724: Wrong path in index.html file [django tutorial]
-------------------------------+--------------------------------------

Reporter: marq | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:

Keywords: index.html | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

You were most likely missing the leading slash in the URL, causing the
browser to treat it as a relative URL.

--
Ticket URL: <https://code.djangoproject.com/ticket/25724#comment:1>

Django

unread,
Nov 10, 2015, 7:27:42 AM11/10/15
to django-...@googlegroups.com
#25724: Wrong path in index.html file [django tutorial]
-------------------------------+--------------------------------------
Reporter: marq | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: invalid

Keywords: index.html | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => invalid


--
Ticket URL: <https://code.djangoproject.com/ticket/25724#comment:2>

Reply all
Reply to author
Forward
0 new messages