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