Use unique login username id.
This commit is contained in:
parent
6f456fc5ce
commit
1eab1e9f10
|
@ -65,7 +65,7 @@ class CLForm(Form):
|
||||||
@writing_blueprint.route('/login', methods=['POST', 'GET'])
|
@writing_blueprint.route('/login', methods=['POST', 'GET'])
|
||||||
def login():
|
def login():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
username = request.form['username']
|
username = request.form['login']
|
||||||
if db.login(username, request.form['password']):
|
if db.login(username, request.form['password']):
|
||||||
session['username'] = username
|
session['username'] = username
|
||||||
return redirect('/')
|
return redirect('/')
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="user logged-out">
|
<div class="user logged-out">
|
||||||
<p>You are here as a guest.</p>
|
<p>You are here as a guest.</p>
|
||||||
<form action="/login" method=post>
|
<form action="/login" method="post">
|
||||||
<label for="username">Username: </label>
|
<label for="login">Username: </label>
|
||||||
<input id="username" maxlength="32" minlength="4" name="username" type="text" placeholder="sagev9000">
|
<input id="login" maxlength="32" minlength="4" name="login" type="text" placeholder="sagev9000">
|
||||||
|
|
||||||
<label for="password">Password: </label>
|
<label for="password">Password: </label>
|
||||||
<input id="password" maxlength="32" minlength="4" name="password" type="password">
|
<input id="password" maxlength="32" minlength="4" name="password" type="password">
|
||||||
|
|
Loading…
Reference in New Issue