diff options
| author | doobry | 2019-10-24 14:08:48 +0200 |
|---|---|---|
| committer | doobry | 2019-10-24 14:08:48 +0200 |
| commit | 05d40216ee96649038f465ae2f28ac7ba28c5048 (patch) | |
| tree | 0d81f5570c76c71277a5c7c4295f514b570b7b21 /main.py | |
| parent | f544d94a8c903dcdc9f576af32958334b4a2a71c (diff) | |
Add support for external config files (Fixes: #33)v0.1.0
Diffstat (limited to '')
| -rw-r--r-- | main.py | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -25,6 +25,7 @@ def create_app(test_config=None): | |||
| 25 | app.config['UPLOAD_FOLDER'] = './uploads/' | 25 | app.config['UPLOAD_FOLDER'] = './uploads/' |
| 26 | app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB | 26 | app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB |
| 27 | app.config['CUSTOM_TEMPLATES_DIR'] = 'custom_templates' | 27 | app.config['CUSTOM_TEMPLATES_DIR'] = 'custom_templates' |
| 28 | app.config.from_object('config') # optionally load settings from config.py | ||
| 28 | 29 | ||
| 29 | app.jinja_loader = jinja2.ChoiceLoader([ # type: ignore | 30 | app.jinja_loader = jinja2.ChoiceLoader([ # type: ignore |
| 30 | jinja2.FileSystemLoader(app.config['CUSTOM_TEMPLATES_DIR']), | 31 | jinja2.FileSystemLoader(app.config['CUSTOM_TEMPLATES_DIR']), |
