added code to initialize db with models and recodres

This commit is contained in:
Tobias Kurze
2019-11-20 12:41:05 +01:00
parent bc1347fe99
commit 60ff5bdeaf
20 changed files with 1658 additions and 136 deletions

View File

@@ -8,7 +8,8 @@ import ssl
from jinja2.exceptions import TemplateNotFound
from backend import app, db
from backend.models import pre_fill_table
from backend.models import room_model, recorder_model
from backend.recorder_adapters import get_defined_recorder_adapters
from backend.tools.model_updater import update_recorder_models_database
@@ -30,7 +31,8 @@ def main():
except Exception as e:
logging.critical(e)
pre_fill_table()
room_model.pre_fill_table()
recorder_model.pre_fill_table()
update_recorder_models_database()
app.run(debug=True, host="0.0.0.0")