Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated web.py to make session permanent #547

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions ihatemoney/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ def create_app(
app.jinja_env.globals["locale_from_iso"] = locale_from_iso
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
babel = Babel(app)

Expand Down