changed database structure
This commit is contained in:
@@ -8,20 +8,19 @@ Thank you for the vote!
|
||||
<h3>Current report</h3>
|
||||
|
||||
<div id="questions">
|
||||
{% for question in questions %}
|
||||
|
||||
{% for qa_item in qa %}
|
||||
<div class = "question autoformat">
|
||||
<h2>{{ question|safe }}</h2>
|
||||
<h2>{{ qa_item[0]|safe }}</h2>
|
||||
<ul>
|
||||
{% for choice in answers[question].answers %}
|
||||
{% if answers[question].answer_type == "single" %}
|
||||
<li class = "summary_single">{{ choice }}: {{ answers[question].answers[choice] }}
|
||||
{% for answer in qa_item[1] %}
|
||||
{% if answer.answer_type == "single" %}
|
||||
<li class = "summary_single">{{ answer.answer }}: {{ answer.count }} ({{ answer.percent }}%)
|
||||
{% endif %}
|
||||
{% if answers[question].answer_type == "multiple" %}
|
||||
<li class = "summary_multiple">{{ choice }}: {{ answers[question].answers[choice] }}
|
||||
{% if answer.answer_type == "multiple" %}
|
||||
<li class = "summary_multiple">{{ answer.answer }}: {{ answer.count }} ({{ answer.percent }}%)
|
||||
{% endif %}
|
||||
{% if answers[question].answer_type == "open" %}
|
||||
<li class = "summary_open">"{{ choice }}"
|
||||
{% if answer.answer_type == "open" %}
|
||||
<li class = "summary_open">"{{ answer.answer }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user