Insert context data to HttpResponse

Greetings,
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

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

    return HttpResponse(page)

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

:man_facepalming:

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