diff --git a/advlabdb/adminModelViews.py b/advlabdb/adminModelViews.py index 1ed0700..521caaa 100644 --- a/advlabdb/adminModelViews.py +++ b/advlabdb/adminModelViews.py @@ -32,7 +32,6 @@ from wtforms.widgets import NumberInput from . import adminSpace, app, assistantSpace, db, user_datastore from .advlabdb_independent_funs import flashRandomPassword -from .configUtils import getConfig from .customClasses import ( CustomIdEndpointLinkRowAction, SecureAdminBaseView, diff --git a/advlabdb/configUtils.py b/advlabdb/configUtils.py deleted file mode 100644 index 923e1e0..0000000 --- a/advlabdb/configUtils.py +++ /dev/null @@ -1,26 +0,0 @@ -import json - - -def getConfig(label): - with open("config.json", "r") as f: - return json.load(f)[label] # TODO: error handling - - -def setConfig(label, value, new=False): - with open("config.json", "r") as f: - config = json.load(f) - - if new and (label in config): - # Setting is not new! # TODO - return False - - if not new and (label not in config): - # Tried to update a setting which is new! # TODO - return False - - config[label] = value - - with open("config.json", "w") as f: - json.dump(config, f) - - return True diff --git a/advlabdb/models.py b/advlabdb/models.py index 4c21ab8..676d1b7 100644 --- a/advlabdb/models.py +++ b/advlabdb/models.py @@ -14,7 +14,6 @@ from flask_security.models.fsqla_v2 import FsRoleMixin, FsUserMixin from sqlalchemy import select from . import db -from .configUtils import getConfig from .exceptions import DataBaseException from .model_independent_funs import get_first