I am cretaing widget in JS. And I want to send html through jquery.html() method. But I am using also django trans tag.
This is my after cretating widget code on html side:
<div class="modal-header" style="padding: 5px;padding-left: 25px;">
<h5 class="modal-title" id="componentName">{% trans "Report" %}</h5>
</div>
And this is my code on JS side
html = '<div class="modal-header" style="padding: 5px;padding-left: 25px;">'+
'<h5 class="modal-title" id="'+IdCreateHelper(component_names[i])+'">'+'{% trans "'+component_names[i]+'" %}'+'</h5>'+
'</div>'
$('#'+modal_id).html(html);
I want to create django tags on JS side but result is:
{% trans "Reports" %}
<h5 class="modal-title" id="componentName">{% trans "Report" %}</h5>
I want to create django tags in js