aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/run.py
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2018-07-16 22:58:48 +0200
committerGitHub <noreply@github.com>2018-07-16 22:58:48 +0200
commit1d0880f3cb39463483a4241197d8eb0d817dffc6 (patch)
treeffb843f74d1d1337a6e66d92b5deb21c0dd9c77e /ihatemoney/run.py
parentc3f8ddd274a40b164b5fceeab44c1c26cf053b04 (diff)
parentf9cc4e56230ce04f58d457bfc8f468d56e53cb36 (diff)
downloadihatemoney-mirror-1d0880f3cb39463483a4241197d8eb0d817dffc6.zip
ihatemoney-mirror-1d0880f3cb39463483a4241197d8eb0d817dffc6.tar.gz
ihatemoney-mirror-1d0880f3cb39463483a4241197d8eb0d817dffc6.tar.bz2
Merge branch 'master' into almet/fix-supervisord-template
Diffstat (limited to 'ihatemoney/run.py')
-rw-r--r--ihatemoney/run.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ihatemoney/run.py b/ihatemoney/run.py
index e3a7c1e..a8de26f 100644
--- a/ihatemoney/run.py
+++ b/ihatemoney/run.py
@@ -11,7 +11,7 @@ from werkzeug.contrib.fixers import ProxyFix
from ihatemoney.api import api
from ihatemoney.models import db
-from ihatemoney.utils import PrefixedWSGI, minimal_round
+from ihatemoney.utils import PrefixedWSGI, minimal_round, IhmJSONEncoder
from ihatemoney.web import main as web_interface
from ihatemoney import default_settings
@@ -68,6 +68,8 @@ def load_configuration(app, configuration=None):
app.config.from_pyfile(env_var_config)
else:
app.config.from_pyfile('ihatemoney.cfg', silent=True)
+ # Configure custom JSONEncoder used by the API
+ app.config['RESTFUL_JSON'] = {'cls': IhmJSONEncoder}
def validate_configuration(app):