From 036ce4d47301d5ea967c76f206530f96be54e73f Mon Sep 17 00:00:00 2001 From: DrashtiS <94853646+DrashtiSanjayShah@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:00:36 +0530 Subject: [PATCH 1/2] Update auth.py Made changes in def login(): there needs to be the parameter password1 taken by variable password. --- website/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/auth.py b/website/auth.py index 8c65752e..3c9747d3 100644 --- a/website/auth.py +++ b/website/auth.py @@ -12,7 +12,7 @@ def login(): if request.method == 'POST': email = request.form.get('email') - password = request.form.get('password') + password = request.form.get('password1') user = User.query.filter_by(email=email).first() if user: From 9c70abc76a6d3cb9361dd989e5c5375786c843ad Mon Sep 17 00:00:00 2001 From: DrashtiS <94853646+DrashtiSanjayShah@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:02:58 +0530 Subject: [PATCH 2/2] Update __init__.py Made changes in def create_database() --- website/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/__init__.py b/website/__init__.py index 8d24a3dd..9a815450 100644 --- a/website/__init__.py +++ b/website/__init__.py @@ -36,6 +36,7 @@ def load_user(id): def create_database(app): - if not path.exists('website/' + DB_NAME): - db.create_all(app=app) - print('Created Database!') + if not os.path.exists('website/' + DB_NAME): + with app.app_context(): + db.create_all() + print("Created Database!")