forked from orbit-oss/flask
working import layout for module
This commit is contained in:
parent
d0dc89ea80
commit
c4f64c1c47
9 changed files with 78 additions and 47 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue