Added field for putting info for a otp system for reseting password with gmail and changed what resetpassword page looks like

This commit is contained in:
Jordan
2026-06-23 11:59:42 +12:00
parent 870ea8118d
commit 4d704e05dd
2 changed files with 14 additions and 2 deletions
+10 -1
View File
@@ -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():
+4 -1
View File
@@ -1,4 +1,7 @@
{% extends 'base.html' %}
{% block content %}
<h2>Work in progress</h2>
<h2>Forgotten you password just enter your email below and you'll be sent a link to reset your password</h2>
<p style="color: gray; text-decoration: underline;">This page is just a placeholder at the moment not functional</p>
<p>Enter email here:<input type="email" id="email" name="email" required><br><br></p>
<button type="resetpassword" style="font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; border-color: gray; border-radius: 4px; border-width: 4px;">Send reset email</button>
{% endblock %}