mod template
This commit is contained in:
parent
1908833642
commit
e7e90bdf6e
3
app.py
3
app.py
@ -30,8 +30,7 @@ def login_post():
|
|||||||
|
|
||||||
auth_token = db.login(username, password)
|
auth_token = db.login(username, password)
|
||||||
if auth_token is None:
|
if auth_token is None:
|
||||||
flash('Nieprawidłowa nazwa użytkownika lub hasło.', 'error')
|
return render_template('login.html', incorrect="Incorrect username or password!")
|
||||||
return redirect(url_for('/'))
|
|
||||||
|
|
||||||
response = make_response(render_template('index.html'))
|
response = make_response(render_template('index.html'))
|
||||||
response.set_cookie('auth_token', auth_token)
|
response.set_cookie('auth_token', auth_token)
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
<input type="password" id="password" name="password" placeholder="Wprowadź hasło">
|
<input type="password" id="password" name="password" placeholder="Wprowadź hasło">
|
||||||
|
|
||||||
<input type="submit" value="Zaloguj się">
|
<input type="submit" value="Zaloguj się">
|
||||||
|
<h2 color="red">{{incorrect}}<h2>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user