add members

config file to enable/disable registration and other future admin settings
This commit is contained in:
cube
2026-03-16 13:11:56 +00:00
parent 2f499674ff
commit e3d6613bd4
10 changed files with 156 additions and 33 deletions

View File

@@ -11,15 +11,11 @@ def create_app(test_config=None):
DATABASE=os.path.join(app.instance_path, 'database.sqlite'),
)
if test_config is None:
# load the instance config, if it exists, when not testing
app.config.from_pyfile('config.py', silent=True)
else:
# load the test config if passed in
app.config.from_mapping(test_config)
# ensure the instance folder exists
os.makedirs(app.instance_path, exist_ok=True)
app.config.from_pyfile('config.py')
#print(app.config["REGISTRATION"])
from . import db
db.init_app(app)
@@ -31,4 +27,7 @@ def create_app(test_config=None):
app.register_blueprint(home.bp)
app.add_url_rule('/', endpoint='index')
from . import manage
app.register_blueprint(manage.bp)
return app