server.py (509B)
1 from flask import Flask 2 from flask_bcrypt import Bcrypt 3 from flask_login import LoginManager 4 from flask_sqlalchemy import SQLAlchemy 5 6 app = Flask(__name__) 7 app.config['SECRET_KEY'] = '5791628bb0b13ce0c676dfde280ba245' 8 app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db' 9 db = SQLAlchemy(app) 10 bcrypt = Bcrypt(app) 11 login_manager = LoginManager(app) 12 login_manager.login_view = 'login' 13 login_manager.login_message_category = 'info' 14 15 # to run 'routes.py' and make the routes available 16 from .routes import *