adding decorator and demo code

This commit is contained in:
Sick Yoon
2016-05-13 10:40:57 +09:00
parent c951e3486f
commit ffa1c08189
12 changed files with 145 additions and 24 deletions

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>aiohttp_security demo</title>
</head>
<body>
{% block content %}{% endblock %}
{% block script %}{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,6 @@
{% extends 'base.html' %}
{% block content %}
<div>
<h1>Hello {{name}}!</h1>
</div>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends 'base.html' %}
{% block content %}
<div>
<h3>Login</h3>
<form class="m-t" role="form" action="/login" method="post">
<div class="form-group">
<input name="username" type="text" class="form-control" placeholder="ID" required="">
</div>
<div class="form-group">
<input name="password" type="password" class="form-control" placeholder="Password" required="">
</div>
<button type="submit">Login</button>
</form>
</div>
{% endblock %}