Varia library working group XPPL. https://gitea.xpub.nl/XPUB/XPPL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
907 B

import os
from os import environ
from dotenv import find_dotenv, load_dotenv
7 years ago
from flask import Flask
from flask_socketio import SocketIO
7 years ago
from flask_sqlalchemy import SQLAlchemy
7 years ago
from sqlalchemy.dialects import registry
7 years ago
registry.register("rqlite.pyrqlite", "sqlalchemy_rqlite.pyrqlite", "dialect")
7 years ago
basedir = os.path.abspath(os.path.dirname(__file__))
UPLOAD_FOLDER = os.path.join(basedir, 'uploads')
UPLOAD_FOLDER_COVER = os.path.join(basedir, 'cover')
7 years ago
load_dotenv(find_dotenv())
7 years ago
app = Flask(__name__)
app.config['SECRET_KEY'] = 'super secret key'
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
7 years ago
app.config['SQLALCHEMY_DATABASE_URI'] = 'rqlite+pyrqlite://localhost:4001/'
7 years ago
app.config['DEBUG'] = True
app.config['PORT'] = 80
7 years ago
db = SQLAlchemy(app)
light = not os.path.isdir(UPLOAD_FOLDER)
7 years ago
DOMAIN = environ.get('DOMAIN')
socketio = SocketIO(app)
7 years ago
app.config.from_object(__name__)
from app import views # noqa