diff --git a/app.py b/app.py index c9346a2..7e39de6 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,4 @@ -from flask import Flask, render_template, request, session +from flask import Flask, render_template, request, session, redirect from helpers import login_required from werkzeug.security import check_password_hash, generate_password_hash import sqlite3 @@ -35,7 +35,7 @@ def register(): return apology("passwords must match", 400) rows = db.execute( - "SELECT * FROM users WHERE username = ?", request.form.get("username") + "SELECT * FROM users WHERE username = ?", (request.form.get("username"),) ) if len(rows) >= 1: diff --git a/templates/login.html b/templates/login.html index 8f69d03..87b17af 100644 --- a/templates/login.html +++ b/templates/login.html @@ -8,11 +8,11 @@
- +
- +
diff --git a/templates/register.html b/templates/register.html index 1bd5051..6912685 100644 --- a/templates/register.html +++ b/templates/register.html @@ -7,15 +7,15 @@ {% block main %}
- +
- +
- +