The rest of the commits to this repo, so we can now start sharing
This commit is contained in:
21
app/__init__.py
Normal file
21
app/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from flask import Flask
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
#from flask_login import LoginManager
|
||||
|
||||
db = SQLAlchemy()
|
||||
#login_manager = LoginManager()
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
|
||||
app.config["SECRET KEY"] = "dev-secret-key"
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///bujo.db"
|
||||
|
||||
db.init_app(app)
|
||||
# login_manager.init_app(app)
|
||||
|
||||
from app import routes
|
||||
app.register_blueprint(routes.bp)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user