From f4e0a52d1c7c590ce893c7e078efea352679a5cd Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 11 Jan 2015 17:30:58 +0200 Subject: server: document and test for simplejson flask uses itsdangerous which uses simplejson The default json converts namedtuples to arrays stripping the names. simplejson converts them to a dictionary, a behavior we rely on. --- README.mediawiki | 6 ++++++ src/server/rz_server.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/README.mediawiki b/README.mediawiki index 5ad0fa2a..1484ffc3 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -14,6 +14,12 @@ A collaborative editor for organizing, communicating, and analyzing data in grap Install [neo4j](http://neo4j.com/download/) Install [gevent-socketio](https://pypi.python.org/pypi/gevent-socketio/) Or Run pip install gevent-socketio + +Install [simplejson](http://undefined.org/python/#simplejson) Or Run pip install simplejson + - flask uses itsdangerous which uses simplejson + - the default json converts namedtuples to arrays stripping the names. + - simplejson converts them to a dictionary, a behavior we rely on. + == Running Rhizi Locally == To run Rhizi locally: For testing locally run neo4j locally on the default 7474 port and then launch run-local.sh:
./run-local.sh diff --git a/src/server/rz_server.py b/src/server/rz_server.py index 569eb7e3..df10d5a2 100644 --- a/src/server/rz_server.py +++ b/src/server/rz_server.py @@ -11,6 +11,12 @@ import flask import crypt_util import re +try: + import simplejson # we don't use it but we rely on it +except: + print("missing simplejson, which is required due to namedtuple usage") + raise SystemExit + from flask import Flask from flask import Response from flask import session -- cgit v1.3.1