mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 05:01:48 +02:00
modified run.py to make session permanent
This commit is contained in:
parent
a8e74c98df
commit
e044fcd47b
1 changed files with 5 additions and 0 deletions
|
@ -147,6 +147,11 @@ def create_app(
|
||||||
app.jinja_env.globals["locale_from_iso"] = locale_from_iso
|
app.jinja_env.globals["locale_from_iso"] = locale_from_iso
|
||||||
app.jinja_env.filters["minimal_round"] = minimal_round
|
app.jinja_env.filters["minimal_round"] = minimal_round
|
||||||
|
|
||||||
|
# Set session to permanent to make language choice persist
|
||||||
|
@app.before_request
|
||||||
|
def make_session_permanent():
|
||||||
|
session.permanent = True
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
babel = Babel(app)
|
babel = Babel(app)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue