From e4d1a44cd80a8e5692f47b7829255fd63c0bbe5b Mon Sep 17 00:00:00 2001 From: Basyrov Rustam Date: Wed, 4 Jun 2025 18:52:49 +0300 Subject: [PATCH] new templates --- polls/templates/polls/detail.html | 18 ++++++++++++------ polls/templates/polls/results.html | 9 +++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 polls/templates/polls/results.html diff --git a/polls/templates/polls/detail.html b/polls/templates/polls/detail.html index 975db2a..1801b1c 100644 --- a/polls/templates/polls/detail.html +++ b/polls/templates/polls/detail.html @@ -1,6 +1,12 @@ -

{{ question.question_text }}

- +
+{% csrf_token %} +
+

{{ question.question_text }}

+ {% if error_message %}

{{ error_message }}

{% endif %} + {% for choice in question.choice_set.all %} + +
+ {% endfor %} +
+ +
diff --git a/polls/templates/polls/results.html b/polls/templates/polls/results.html new file mode 100644 index 0000000..3b2c74f --- /dev/null +++ b/polls/templates/polls/results.html @@ -0,0 +1,9 @@ +

{{ question.question_text }}

+ + + +Vote again?