On the login page, which will be accessible via the /login URL, we want to display the login form; that is, the login and password input fields and the submit button. Flask, like many web frameworks, uses a template generator, allowing us to dynamically display variables on the page. The template generator used by Flask is called Jinja2. The following Jinja2 template allows us to display a simple login form with two text inputs (login and password) and a submit button:
<form method="POST" action="/login">
{{ form.csrf_token }}
<div class="form-field">{{ form.login.label }} {{ form.login }}</div>
<div class="form-field">{{ form.password.label }} {{ form.password }}</div>
{{ form.submit }}
</form>
This template can be added to the templates/login.html file, after we've added the basic HTML tags (see https://github.com/PacktPublishing/Hands-On-Graph-Analytics...