Rozwiazywanie testow #22

Merged
s470631 merged 2 commits from feature/post-test-answers into master 2022-01-17 16:06:22 +01:00
2 changed files with 11 additions and 1 deletions
Showing only changes of commit 6703406b7e - Show all commits

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: