working import layout for module

This commit is contained in:
Justin Quick 2010-07-02 15:10:32 -04:00
parent d0dc89ea80
commit c4f64c1c47
9 changed files with 78 additions and 47 deletions

View file

@ -1,3 +1,9 @@
from werkzeug import Request as RequestBase, Response as ResponseBase, \
cached_property
from helpers import json
class Request(RequestBase):
"""The request object used by default in flask. Remembers the
matched endpoint and view arguments.
@ -35,6 +41,7 @@ class Request(RequestBase):
parsed JSON data.
"""
if __debug__:
from flask.helpers import _assert_have_json
_assert_have_json()
if self.mimetype == 'application/json':
return json.loads(self.data)