add templates for views

This commit is contained in:
Basyrov Rustam
2025-06-04 15:17:03 +03:00
parent 7f30560c68
commit 701d9d9691
2 changed files with 15 additions and 0 deletions

View File

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

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 %}