Require English for viewing specs

This commit is contained in:
str4d
2016-04-10 22:02:57 +00:00
parent 1ff759b878
commit a19e6860fd

View File

@ -137,6 +137,9 @@ cache = Cache(app, config=CACHE_CONFIG)
@babel.localeselector
def get_locale():
# If viewing specs, require English
if request.path.startswith('/spec'):
return 'en'
# If the language is already set from the url, use that
if hasattr(g, 'lang'):
return g.lang