mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-06-24 14:20:34 -04:00
Add support for external config files (Fixes: #33)
This commit is contained in:
parent
f544d94a8c
commit
05d40216ee
3 changed files with 15 additions and 0 deletions
1
main.py
1
main.py
|
@ -25,6 +25,7 @@ def create_app(test_config=None):
|
|||
app.config['UPLOAD_FOLDER'] = './uploads/'
|
||||
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB
|
||||
app.config['CUSTOM_TEMPLATES_DIR'] = 'custom_templates'
|
||||
app.config.from_object('config') # optionally load settings from config.py
|
||||
|
||||
app.jinja_loader = jinja2.ChoiceLoader([ # type: ignore
|
||||
jinja2.FileSystemLoader(app.config['CUSTOM_TEMPLATES_DIR']),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue