-1

In my my project I am trying to create a modal login page... I already have created login.html ... and am curious if one could load this file into a modal script using jinja2...

<h1>Popup Modal</h1>
<div>
    <a class="button" href="#popup1">Log In</a>
</div>

<div id="popup1">
    <div class="popup">
        {{ jinja code to inject login.html }}
    </div>
</div>

Is this possible???

user90939
  • 7
  • 5

1 Answers1

0

Yes, it's possible: use the {% include %} directive

{% include 'login.html' %}

See https://jinja.palletsprojects.com/en/2.11.x/templates/#include for more information.

Simeon Nedkov
  • 1,097
  • 7
  • 11