From 48a0cd8ee5581c64f41988798b5aa7c73e25b1aa Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 22 Feb 2022 13:15:45 +0100 Subject: support Flask 1.0 --- src/hydrilla/server/serve.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/hydrilla/server') diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py index 2ef30cb..4ec2a17 100644 --- a/src/hydrilla/server/serve.py +++ b/src/hydrilla/server/serve.py @@ -459,7 +459,13 @@ class HydrillaApp(flask.Flask): if self.debug and os.environ.get('WERKZEUG_RUN_MAIN') != 'true': return - self.jinja_options['extensions'] = ['jinja2.ext.i18n'] + self.jinja_options = { + **self.jinja_options, + 'extensions': [ + *self.jinja_options.get('extensions', []), + 'jinja2.ext.i18n' + ] + } self._hydrilla_translation = \ util.translation(here / 'locales', hydrilla_config['language']) -- cgit v1.2.3