16 lines
592 B
HTML
16 lines
592 B
HTML
{% load static %}
|
|
<link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' %}">
|
|
{% if latest_question_list %}
|
|
<ul>
|
|
{% for question in latest_question_list %}
|
|
{# <li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li> #}
|
|
{# refactor the hardcoded URL #}
|
|
{# <li><a href="{% url 'detail' question.id %}">{{ question.question_text }}</a></li> #}
|
|
{# use URL namespace #}
|
|
<li><a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p>No polls are available.</p>
|
|
{% endif %}
|