added login form from tutorial
This commit is contained in:
14
app/templates/base.html
Normal file
14
app/templates/base.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
{% if title %}
|
||||
<title>{{ title }} - Microblog</title>
|
||||
{% else %}
|
||||
<title>Welcome to Microblog</title>
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<div>Microblog: <a href="/index">Home</a></div>
|
||||
<hr>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
18
app/templates/login.html
Normal file
18
app/templates/login.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% 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) }}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=32) }}
|
||||
</p>
|
||||
<p>{{ form.remember_me() }} {{ from.remember_me.label }}</p>
|
||||
<p>{{ form.submit() }} </p>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user