1
0
forked from finn/site

mg tut c3

This commit is contained in:
2024-08-01 03:33:45 -07:00
parent fed4454a05
commit 426e917df9
12 changed files with 788 additions and 33 deletions

View File

@ -1,6 +1,7 @@
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="{{ url_for('static', filename='simple.css') }}">
{% if title %}
<title>{{ title }} - blog</title>
{% else %}
@ -8,8 +9,24 @@
{% endif %}
</head>
<body>
<div>blgo: <a href="/index">home</a></div>
<div>
blgo:
<a href="{{ url_for('index') }}">home</a>
<a href="{{ url_for('login') }}">login</a>
</div>
<hr>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</body>
</html>

View File

@ -0,0 +1,25 @@
{% extends "base.html" %}
{% block content %}
<h1>Sign In</h1>
<form action="" method="post" novalidate>
{{ form.hidden_tag() }}
<p>
{{ form.username.label }}<br>
{{ form.username(size=32) }}<br>
{% for error in form.username.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>
{{ form.password.label }}<br>
{{ form.password(size=32) }}<br>
{% for error in form.password.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>{{ form.remember_me() }} {{ form.remember_me.label }}</p>
<p>{{ form.submit }}</p>
</form>
{% endblock %}