start work on accounts
This commit is contained in:
parent
9753b3e6a9
commit
1f852c5592
2 changed files with 30 additions and 0 deletions
|
@ -14,4 +14,8 @@ def index():
|
||||||
def new():
|
def new():
|
||||||
return render_template('new.j2', instance=instance)
|
return render_template('new.j2', instance=instance)
|
||||||
|
|
||||||
|
@app.route("/login", methods=['GET', 'POST'])
|
||||||
|
def login():
|
||||||
|
return render_template('login.j2', instance=instance)
|
||||||
|
|
||||||
app.run(debug=True)
|
app.run(debug=True)
|
||||||
|
|
26
src/toastbin/templates/login.j2
Normal file
26
src/toastbin/templates/login.j2
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>toastbin - {{ instance }}</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<a href="/">home</a> | <a href="new">new paste</a> | <a href="explore">explore</a>
|
||||||
|
</header>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<p>
|
||||||
|
log in to {{ instance }}.
|
||||||
|
</p>
|
||||||
|
<form method="post">
|
||||||
|
<label for="username">username: </label>
|
||||||
|
<input name="username" id="username" placeholder="username" />
|
||||||
|
<br>
|
||||||
|
<label for="password">password: </label>
|
||||||
|
<input name="password" id="password" placeholder="hunter2" type="password"></textarea>
|
||||||
|
<br>
|
||||||
|
<button type="post">login</button>
|
||||||
|
</form>
|
||||||
|
</body>
|
Loading…
Add table
Reference in a new issue