26 lines
701 B
Python
26 lines
701 B
Python
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'] = 'devkey' # Change this later
|
|
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///do_tracker.db'
|
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
|
|
|
db.init_app(app)
|
|
# login_manager.init_app(app)
|
|
|
|
from .routes import main as main_blueprint
|
|
app.register_blueprint(main_blueprint)
|
|
|
|
from .auth import auth as auth_blueprint
|
|
app.register_blueprint(auth_blueprint)
|
|
|
|
from . import models # <-- 🔥 this is what was missing
|
|
|
|
return app
|