Insert context data to HttpResponse

To make it easier for my self from my point of view i want to eliminate amount of files and just make the response from pure text with data. I am using HTMX but i am not able to send correct data from the view

    {% for hdata in data %}
    <tr {% if hdata.totalqty <= 0 %} bgcolor="lightcoral" {% else %}{%endif%}>
        <td style="overflow: hidden">|{{ }}|</td>
        <td>{{ hdata.totalqty }}</td>
    {% endfor %}"""        

    return HttpResponse(page)

How can i return this response with the {[‘data’]=data} ?


    from django.template import Template
    template = Template(page)
    context = Context({"data":data})
    return HttpResponse(template.render(context))