mg tut c3
This commit is contained in:
@ -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>
|
||||
|
25
backend/app/templates/login.html
Normal file
25
backend/app/templates/login.html
Normal 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 %}
|
Reference in New Issue
Block a user