Browse Source

added workaround for json on Google AppEngine

Google AppEngine unfortunately does not offer json/simplejson where
we would expect it to be, but since they do offer django and django
comes with simplejson as a frozen dependency, we can import it
from there.

prior art:
http://github.com/facebook/python-sdk/blob/master/src/facebook.py#L50
pull/112/head
Thomas Schranz 15 years ago committed by Armin Ronacher
parent
commit
0198313a22
  1. 7
      flask/helpers.py

7
flask/helpers.py

@ -26,7 +26,12 @@ except ImportError:
try:
import json
except ImportError:
json_available = False
try:
# Google Appengine offers simplejson via django
from django.utils import simplejson as json
except ImportError:
json_available = False
from werkzeug import Headers, wrap_file, is_resource_modified, cached_property
from werkzeug.exceptions import NotFound

Loading…
Cancel
Save