change to use jinja2 and stop saving file and then reading the data

This commit is contained in:
Ugric
2026-01-23 04:51:30 +00:00
parent ecd728fe27
commit 6c17b6c115
6 changed files with 198 additions and 140 deletions

16
templates/login.jinja Normal file
View File

@@ -0,0 +1,16 @@
{%set page_title = "Login"%}
{% extends "base.jinja" %}
{% block body %}
<form class="login-box" method="POST" action="/login-and-download">
<h2>Coventry University Login</h2>
<input type="text" name="username" placeholder="Username" required>
<input type="password" name="password" placeholder="Password" required>
<button type="submit">Login & Download</button>
<!-- Optional: server can re-render this with an error message -->
{% if error|trim %}<div class="error">{{error}}</div>{% endif %}
</form>
{% endblock %}