Opened 9 years ago

Closed 9 years ago

#25724 closed Bug (invalid)

Wrong path in index.html file [django tutorial]

Reported by: marq Owned by: nobody
Component: Documentation Version: 1.8
Severity: Normal Keywords: index.html
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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>

Change History (2)

comment:1 by Aymeric Augustin, 9 years ago

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

comment:2 by Tim Graham, 9 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top