calendarwatch_frontend/server/__init__.py
raphael c89ecd7134 adds backend script which can be run as a cronjob every n minutes to generate new json files for google calendars
- database updated to save google credentials
- database updated to save json calendar information
- json still saved as a json file under userinfo/<user.id>/calendarevents.json
2020-04-24 17:54:56 +00:00

28 lines
601 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