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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user