Greetings,
i have index file that have a variables that was passed from view that have a template html file where it reads this for example:
template.html
<tr>
<th>cnt</th>
<th>dt</th>
<th>dt_a</th>
<th>dt_first</th>
<th>dt_last</th>
<th>dt_1</th>
</tr>
{% for i in order %}
<tr>
<tr>
<td>{{ i.cnt }}</td>
<td>{{ i.dt }}</td>
<td>{{ i.dt_a }}</td>
<td>{{ i.dt_first }}</td>
<td>{{ i.dt_last }}</td>
<td>{{ i.dt_1 }}</td>
</tr>
{% endfor %}
It is feeding the main html table.
What i would like to ask, how it is possible to make it happen without the template html file.
I would make multiline variable like this for example in a view:
data="""<tr>
<th>cnt</th>
<th>ip</th>
<th>ports</th>
<th>dt_first</th>
<th>dt_last</th>
<th>dt_ban_till</th>
</tr>
{% for i in order %}
<tr>
<tr>
<td>{{ i.cnt }}</td>
<td>{{ i.dt }}</td>
<td>{{ i.dt_a }}</td>
<td>{{ i.dt_first }}</td>
<td>{{ i.dt_last }}</td>
<td>{{ i.dt_1 }}</td>
</tr>
{% endfor %}"""
maybe some breaklines is needed. How can i achive to send template from view with variable without html template file. Thank you