End tuto03

This commit is contained in:
Ambulance Clerc
2021-12-20 18:46:18 +01:00
parent 769078f261
commit d84d7d9823
5 changed files with 67 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
<h1>{{ question.question_txt }}</h1>
<ul>
{% for choice in question.choice_set.all %}
<li>{{ choice.choice_txt }}</li>
{% endfor %}
</ul>

View File

@@ -0,0 +1,10 @@
{% if latest_question_list %}
<h1>Liste des questions:</h1>
<ul>
{% for question in latest_question_list %}
<li><a href="{% url 'polls:detail' question.id %}/">{{ question.question_txt }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}