mod template

This commit is contained in:
Mateusz779 2023-04-13 12:06:23 +02:00
parent 1908833642
commit e7e90bdf6e
2 changed files with 2 additions and 2 deletions

3
app.py
View File

@ -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)

View File

@ -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>