This commit is contained in:
Hubert Jankowski 2022-01-16 23:54:52 +01:00
parent 9b1143aa41
commit 6703406b7e
2 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load rest_framework %}
{% block title %}{{ test.name }}{% endblock %}
@ -32,8 +33,8 @@
<div class="question_title">
{{ question.description }}
</div>
<div class="list-group">
<form method="post" novalidate>
{% for answer in question.answers.all %}
<label class="list-group-item">
<input class="form-check-input me-1" type="radio" name={{ question.id }} value={{ answer.id }}>
@ -45,6 +46,10 @@
{% endfor %}
</div>
<input class="testContent" type="submit" value="Send answers">
{# <button type="submit" class="testContent" value="Send answers"></button>#}
</form>
</div>
{% endblock %}

View File

@ -29,6 +29,11 @@ class TestTemplateView(TemplateView):
return context
def post(self, request, *args, **kwargs):
import pdb;pdb.set_trace()
question_id = 1
answers = []
while True: