Restored 2.5 compatibility and actual fix for the json problem
This commit is contained in:
parent
80eb6cfffc
commit
51a89bf35e
4 changed files with 9 additions and 4 deletions
|
|
@ -19,6 +19,7 @@ from zlib import adler32
|
|||
# try to load the best simplejson implementation available. If JSON
|
||||
# is not installed, we add a failing class.
|
||||
json_available = True
|
||||
json = None
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
|
|
@ -32,7 +33,6 @@ from werkzeug import Headers, wrap_file, is_resource_modified, cached_property
|
|||
from jinja2 import FileSystemLoader
|
||||
|
||||
from .globals import session, _request_ctx_stack, current_app, request
|
||||
from .wrappers import Response
|
||||
|
||||
|
||||
def _assert_have_json():
|
||||
|
|
@ -364,3 +364,7 @@ class _PackageBoundObject(object):
|
|||
subfolders use forward slashes as separator.
|
||||
"""
|
||||
return open(os.path.join(self.root_path, resource), 'rb')
|
||||
|
||||
|
||||
# circular dependencies between wrappers and helpers
|
||||
from .wrappers import Response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue