calendarwatch_frontend/server/__init__.py

28 lines
620 B
Python
Raw Normal View History

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)
2020-05-24 13:33:48 +02:00
from server import routes
from database import models