Hello,
I am new to django.
I am using django forms in my project and I am not using django models.
From the user, my django form asks for 4 inputs :- signal_to_noise_1 , signal_to_noise_2, bandwidth1 and bandwidth2.
Based on these values I use my look up table and I create a results which are 2 lists of records.
Each list has approximately 40 to 50 records. Each record has 8 fields. (field1,...field8) ...
Each list looks like this (if my description is not clear) field1 is unique.
| field1 | field2 | field3 |
|
|
|
| field8 |
|
|
|
|
|
|
|
|
| | | | | | | |
Both the lists (with each list having about 50 records) are in my django view.
I am not sure how to convert these list of record objects to this dictionary format which has {"name":value} pair.
Even the django tables requires it in the dictionary format.....
But I did not understand what exactly the below syntax does and how I can customize it to my usecase ....any input would be greatly appreciated ...
<table>
{% for r in results %}
{% cycle '<tr>' '' '' '' %}
<td>{{r.content}}</td>
{% cycle '' '' '' '</tr>' %}
{% endfor %}
</table>