Initialise Babel on application startup
This commit is contained in:
parent
61fe581df6
commit
e5e93c60b3
@ -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__)
|
||||
|
Loading…
Reference in New Issue
Block a user