Sorry for the confusion. I’ve tried so many variations I basically got lost in the code and haven’t pulled unused code.
The top block of code was where I created separate question sets that then had HTML code for each set.
The for loop was to create a dictionary I could iterate through to get the questions by topic.
Here’s my layout, using just questions2 to show how it should layout:
I had also tried the for loop.
<tr>{% for topic, questions in questions_list %}</tr>
<td colspan="7">{{ topic }}</td>
<tr>{% for question in questions_list%}</tr>
<td class="question">{{ question }}</td>
but all I get is the column headers, no topics or questions.
when I used
{% for topic in topic %}
<td colspan="7">{{ topic }}</td>
<tr>{% for question in questions_list%}</tr>
<td class="question">{{ question }}</td>
I’d get topics but no questions
Thanks for the prefech tip.
