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'])
|
||||
def login():
|
||||
if request.method == 'POST':
|
||||
username = request.form['username']
|
||||
username = request.form['login']
|
||||
if db.login(username, request.form['password']):
|
||||
session['username'] = username
|
||||
return redirect('/')
|
||||
|
|
|
@ -51,9 +51,9 @@
|
|||
{% else %}
|
||||
<div class="user logged-out">
|
||||
<p>You are here as a guest.</p>
|
||||
<form action="/login" method=post>
|
||||
<label for="username">Username: </label>
|
||||
<input id="username" maxlength="32" minlength="4" name="username" type="text" placeholder="sagev9000">
|
||||
<form action="/login" method="post">
|
||||
<label for="login">Username: </label>
|
||||
<input id="login" maxlength="32" minlength="4" name="login" type="text" placeholder="sagev9000">
|
||||
|
||||
<label for="password">Password: </label>
|
||||
<input id="password" maxlength="32" minlength="4" name="password" type="password">
|
||||
|
|
Loading…
Reference in New Issue