adding decorator and demo code
This commit is contained in:
13
demo/session_auth/templates/base.html
Normal file
13
demo/session_auth/templates/base.html
Normal 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>
|
||||
6
demo/session_auth/templates/index.html
Normal file
6
demo/session_auth/templates/index.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1>Hello {{name}}!</h1>
|
||||
</div>
|
||||
{% endblock %}
|
||||
15
demo/session_auth/templates/login.html
Normal file
15
demo/session_auth/templates/login.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user