diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-05-26 20:49:36 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-05-26 20:49:36 +0200 |
commit | 2453b700c28131f0c23525112315a33983d66dcb (patch) | |
tree | 93a33333950c7ebdcfceb93d50037e9da4949cdc | |
parent | d99d89cfe1f79ab0cad756a6a21beadd93c65e5b (diff) | |
download | kosten-2453b700c28131f0c23525112315a33983d66dcb.tar.gz kosten-2453b700c28131f0c23525112315a33983d66dcb.tar.bz2 kosten-2453b700c28131f0c23525112315a33983d66dcb.zip |
Update dependencies
Diffstat (limited to '')
-rw-r--r-- | kosten/app/__init__.py | 4 | ||||
-rw-r--r-- | kosten/app/views/__init__.py | 4 | ||||
-rw-r--r-- | requirements.txt | 25 |
3 files changed, 19 insertions, 14 deletions
diff --git a/kosten/app/__init__.py b/kosten/app/__init__.py index 7c6408a..7079d8c 100644 --- a/kosten/app/__init__.py +++ b/kosten/app/__init__.py @@ -1,8 +1,12 @@ from flask import Flask +import simplejson # create app app = Flask('kosten', instance_relative_config = True) +# simplejson knows how to handle Decimal +app.json_encoder = simplejson.JSONEncoder + # force autoescape in all files app.jinja_env.autoescape = True diff --git a/kosten/app/views/__init__.py b/kosten/app/views/__init__.py index 6b432e8..e9e38e9 100644 --- a/kosten/app/views/__init__.py +++ b/kosten/app/views/__init__.py @@ -22,7 +22,7 @@ __all__ = [ mobile_checks = ['J2ME', 'Opera Mini'] app.add_template_global(zip) -app.add_template_global(current_user) +app.add_template_global(current_user, 'current_user') @app.before_request def handle_mobile(): @@ -36,7 +36,7 @@ def static_url(s, **kwargs): @app.template_filter('eur') def eur(s): - return ('%s EUR' % s) + return f'{s} EUR' @app.template_filter('date') def format_date(s, format='%Y/%m'): diff --git a/requirements.txt b/requirements.txt index a31a772..a5f9a67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,15 @@ -click==7.1.2 -Flask==1.1.2 +click==8.0.1 +Flask==2.0.1 Flask-Login==0.5.0 -Flask-SQLAlchemy==2.4.3 -Flask-WTF==0.14.3 +Flask-SQLAlchemy==2.5.1 +Flask-WTF==0.15.1 flipflop==1.0 -itsdangerous==1.1.0 -Jinja2==2.11.2 -MarkupSafe==1.1.1 -passlib==1.7.2 -simplejson==3.17.2 -SQLAlchemy==1.3.17 -Werkzeug==1.0.1 -WTForms==2.3.1 +greenlet==1.1.0 +itsdangerous==2.0.1 +Jinja2==3.0.1 +MarkupSafe==2.0.1 +passlib==1.7.4 +SQLAlchemy==1.4.15 +Werkzeug==2.0.1 +WTForms==2.3.3 +simplejson==3.17.2
\ No newline at end of file |