From 4d704e05dd1951c6839d6611a6219feada316e76 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 23 Jun 2026 11:59:42 +1200 Subject: [PATCH] Added field for putting info for a otp system for reseting password with gmail and changed what resetpassword page looks like --- app.py | 11 ++++++++++- templates/resetpassword.html | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 6ad61d8..4b2691d 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,7 @@ from functools import wraps from flask import Flask, render_template, redirect, request, url_for, session, flash +from flask_mail import Mail from flask_sqlalchemy import SQLAlchemy from werkzeug.security import generate_password_hash, check_password_hash from sqlalchemy.exc import IntegrityError @@ -9,7 +10,7 @@ app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///accounts.db' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False -app.secret_key = 'super_secret_session_encryption_key' +app.secret_key = 'this key is so secret noone will ever get it 👌' db = SQLAlchemy(app) class User(db.Model): @@ -81,6 +82,14 @@ def view_users(): return html_output +#Mail system uncomment all of this to use but requires a google account to use will have to put email in username area and password well in password area +#app.config['MAIL_SERVER'] = 'smtp.google.com' +#app.config['MAIL_PORT'] = 587 +#app.config['MAIL_USE_TLS'] = True +#app.config['MAIL_USERNAME'] = '' +#app.config['MAIL_PASSWORD'] = '' + + @app.route('/') def home(): diff --git a/templates/resetpassword.html b/templates/resetpassword.html index 9a96079..16f5e01 100644 --- a/templates/resetpassword.html +++ b/templates/resetpassword.html @@ -1,4 +1,7 @@ {% extends 'base.html' %} {% block content %} -

Work in progress

+

Forgotten you password just enter your email below and you'll be sent a link to reset your password

+

This page is just a placeholder at the moment not functional

+

Enter email here:

+ {% endblock %} \ No newline at end of file