Part 3 Tutorial Done

This commit is contained in:
lm
2021-08-27 17:27:16 +02:00
parent 93186e2501
commit 4faefebe47
4 changed files with 39 additions and 3 deletions
@@ -0,0 +1,6 @@
<h1>{{ question.question_text }}</h1>
<ul>
{% for choice in question.choice_set.all %}
<li>{{ choice.choice_text }}</li>
{% endfor %}
</ul>
+9
View File
@@ -0,0 +1,9 @@
{% if latest_question_list %}
<ul>
{% for question in latest_question_list %}
<li><a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}