Initial Commit für das Grundgerüst der Anwendung, bestehend aus der Dev-Container Konfiguration, der Docker und docker-Compose Definitionen sowie der Verzeichnisse App_Server für die Backend-Programme sowie Client für die browserseitigen GUI-Komponenten
This commit is contained in:
1 parent
10549934ea
commit
1ba78992a6
63 files changed
+5410
No files matched your search
@@ -0,0 +1,45 @@
|
||||
from flask import Flask
|
||||
from flask_login import LoginManager
|
||||
from settings import Configuration
|
||||
from db import dbauth
|
||||
from db import dbapp
|
||||
from auth.model.checkdb import checkupdates as checkupdatesauth
|
||||
# from model.checkdb import checkupdates as checkupdatesappdb
|
||||
from os import path
|
||||
|
||||
login_manager = LoginManager()
|
||||
|
||||
|
||||
def init_app():
|
||||
app = Flask(__name__)
|
||||
|
||||
config: Configuration = Configuration("root/config.ini")
|
||||
_projektname = config.app_projectname
|
||||
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:////usr/var/pythonappdb/{}.db".format(_projektname)
|
||||
app.config["SQLALCHEMY_BINDS"] = {
|
||||
"auth": "sqlite:////usr/var/pythonappdb/auth.db",
|
||||
"appdb": "sqlite:////usr/var/pythonappdb/{}.db".format(_projektname)
|
||||
}
|
||||
app.config["DEBUG"] = path.exists("root/debug")
|
||||
app.config["PROJEKTNAME"] = config.app_projectname
|
||||
app.config["APPVERSION"] = config.clientapp_version
|
||||
app.config["SECRET_KEY"] = config.flask_secret
|
||||
|
||||
# Initialize Plugins
|
||||
login_manager.init_app(app)
|
||||
dbauth.init_app(app)
|
||||
#dbapp.init_app(app)
|
||||
|
||||
with app.app_context():
|
||||
# Include our Routes
|
||||
print("before auth.routes", flush=True)
|
||||
from auth import routes
|
||||
from routes import general
|
||||
checkupdatesauth()
|
||||
# checkupdatesappdb()
|
||||
|
||||
# from maintenance import init_cli
|
||||
|
||||
return app
|
||||
|
||||
Reference in new issue
Block a user