diff options
| author | Glandos <bugs-github@antipoul.fr> | 2021-06-09 23:56:41 +0200 |
|---|---|---|
| committer | Glandos <bugs-github@antipoul.fr> | 2021-06-10 00:09:59 +0200 |
| commit | c62965d4bfffa6b1f33d34b949431d8a2055af71 (patch) | |
| tree | 97309ecf27d12215bd898aa348dee0dcb08f3871 /ihatemoney/run.py | |
| parent | 44fa1af375aaaeb3f1b105871951940fa0fa37c1 (diff) | |
| download | ihatemoney-mirror-c62965d4bfffa6b1f33d34b949431d8a2055af71.zip ihatemoney-mirror-c62965d4bfffa6b1f33d34b949431d8a2055af71.tar.gz ihatemoney-mirror-c62965d4bfffa6b1f33d34b949431d8a2055af71.tar.bz2 | |
fix basic deprecation warnings
Diffstat (limited to 'ihatemoney/run.py')
| -rw-r--r-- | ihatemoney/run.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ihatemoney/run.py b/ihatemoney/run.py index 4ce8aaa..fc927e4 100644 --- a/ihatemoney/run.py +++ b/ihatemoney/run.py @@ -7,7 +7,7 @@ from flask import Flask, g, render_template, request, session from flask_babel import Babel, format_currency from flask_mail import Mail from flask_migrate import Migrate, stamp, upgrade -from jinja2 import contextfilter +from jinja2 import pass_context from werkzeug.middleware.proxy_fix import ProxyFix from ihatemoney import default_settings @@ -158,7 +158,7 @@ def create_app( # Undocumented currencyformat filter from flask_babel is forwarding to Babel format_currency # We overwrite it to remove the currency sign ยค when there is no currency - @contextfilter + @pass_context def currency(context, number, currency=None, *args, **kwargs): if currency is None: currency = context.get("g").project.default_currency |
