forked from orbit-oss/flask
Ported examples over to new config. documented upgrading
This commit is contained in:
parent
02b916d509
commit
dfecc86dd3
17 changed files with 122 additions and 39 deletions
|
|
@ -63,9 +63,9 @@ notified about that and the user asked again::
|
|||
def login():
|
||||
error = None
|
||||
if request.method == 'POST':
|
||||
if request.form['username'] != USERNAME:
|
||||
if request.form['username'] != app.config['USERNAME']:
|
||||
error = 'Invalid username'
|
||||
elif request.form['password'] != PASSWORD:
|
||||
elif request.form['password'] != app.config['PASSWORD']:
|
||||
error = 'Invalid password'
|
||||
else:
|
||||
session['logged_in'] = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue