From e5e93c60b36db3c2da0816b97631fed39835d62f Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 29 Jun 2018 10:38:18 +0200 Subject: [PATCH] Initialise Babel on application startup --- app/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/__init__.py b/app/__init__.py index 84bef46..58e8584 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -17,6 +17,7 @@ import os from flask import Flask, render_template +from flask_babel import Babel class CalendarSocialApp(Flask): @@ -28,6 +29,7 @@ class CalendarSocialApp(Flask): config_name = os.environ.get('ENV', config or 'dev') self.config.from_pyfile(f'config_{config_name}.py', True) db.init_app(self) + babel = Babel(app=self) app = CalendarSocialApp(__name__)