From the .js file you need to transfer the {% include '_template.html' %} template to the html-page inside <div id="some_id"></div> .

The problem is that when pasting through $('#some_id').html("{% include '_template.html' %}"); instead of the contents of _template.html, inside the div is the text "{% include '_template.html'%}"

  • If you pass this after generating the page, it will not work. Those. You can not put the script on the page and get the generated data. flask processes jinja templates at the request stage, and not after the page is issued to the user - kot_mapku3

0