Commit 685884c8 authored by colmoneill's avatar colmoneill

as of version 0.11 of flask-babel, modules babel and gettext need to be...

as of version 0.11 of flask-babel, modules babel and gettext need to be imported from flask_babelex and not flask_babel ref:  https://github.com/python-babel/flask-babel/issues/111
parent 75642b5f
......@@ -26,7 +26,7 @@ from flask_admin.form import rules
from flask_admin.contrib.mongoengine import ModelView, filters
from flask_admin.model.fields import InlineFormField, InlineFieldList
from flask_babel import Babel, gettext
from flask_babelex import Babel, gettext
LANGUAGES = {
'en': 'English',
......@@ -227,7 +227,7 @@ def index():
articles = (p for p in pages if 'published' in p.meta)
# Show the 10 most recent articles, most recent first.
# print(current_user.language)
print(session['language'])
# print(session['language'])
latest = sorted(articles, reverse=True,
key=lambda p: p.meta['published'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment