avancé de dev

This commit is contained in:
Ambulance Clerc
2022-02-15 14:48:18 +01:00
parent d84d7d9823
commit c990f87413
162 changed files with 27899 additions and 27 deletions

View File

@@ -1,6 +1,12 @@
<h1>{{ question.question_txt }}</h1>
<ul>
{% for choice in question.choice_set.all %}
<li>{{ choice.choice_txt }}</li>
{% endfor %}
</ul>
<form action="{% url 'polls:vote' question.id %}" method="post">
{%csrf_token%}
<fieldset>
<legend><h1>{{question.question_txt}}</h1></legend>
{%if error_message%}<p><strong>{{error_message}}</strong></p>{%endif%}
{%for choice in question.choice_set.all%}
<input type="radio" name="choice" id="choice{{forloop.counter}}" value="{{choice.id}}" />
<label for="choice{{forlopp.counter}}">{{choice.choice_txt}}</label><br>
{% endfor %}
</fieldset>
<input type="submit" value="Vote">
</form>

View File

@@ -1,8 +1,11 @@
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' %}">
{% 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>
<li><a href="{% url 'polls:detail' question.id %}">{{ question.question_txt }}</a></li>
{% endfor %}
</ul>
{% else %}