add members
config file to enable/disable registration and other future admin settings
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user