calendarwatch_frontend/server/__init__.py
raphael f156d38739 adds more advanced database handling unsing sql alchemy
- moves app into package
- adds sql alchemy equipment
- moves templates into server package
- add app.db sqlite file
2020-04-22 20:15:21 +00:00

29 lines
602 B
Python

import os
import sqlite3
from flask import Flask
from config import Config
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager
# Flask app setup
app = Flask(__name__,
static_folder='static',
template_folder='template')
app.secret_key = os.environ.get("SECRET_KEY") or os.urandom(24)
app.config.from_object(Config)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
# User session management setup
# https://flask-login.readthedocs.io/en/latest
login_manager = LoginManager(app)
from server import routes, models