From 69b8b15887ed8d1a6231cfc4891466397a18af8c Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sun, 22 Sep 2019 12:19:02 -0400 Subject: [PATCH] fix templates not reloading even when explicitly set --- video_metadata/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/video_metadata/__init__.py b/video_metadata/__init__.py index bbb2d08..c1ca90b 100644 --- a/video_metadata/__init__.py +++ b/video_metadata/__init__.py @@ -26,6 +26,11 @@ def create_app(): app.jinja_env.lstrip_blocks = True app.config.from_object(default_config(app)) + # TEMPLATES_AUTO_RELOAD wasn't working with uwsgi + # https://github.com/pallets/flask/issues/1907#issuecomment-471320980 + if app.config['DEBUG'] == True: + app.jinja_env.auto_reload = True + # add local config changes app.config.from_pyfile('local_config.py')