docs: Change complex example to match new middleware feature

The `process_response` method of `JSONTranslator` is missing the
`resource` argument in order to fully comply with the new middleware
feature.

Closes #443
This commit is contained in:
Jen Montes
2015-02-08 18:29:47 -05:00
parent 0f1ef875fb
commit 3cb5cfbbae
3 changed files with 3 additions and 3 deletions

View File

@@ -282,7 +282,7 @@ class JSONTranslator(object):
'JSON was incorrect or not encoded as '
'UTF-8.')
def process_response(self, req, resp):
def process_response(self, req, resp, resource):
if 'result' not in req.context:
return

View File

@@ -302,7 +302,7 @@ Here is a more involved example that demonstrates reading headers and query para
'JSON was incorrect or not encoded as '
'UTF-8.')
def process_response(self, req, resp):
def process_response(self, req, resp, resource):
if 'result' not in req.context:
return

View File

@@ -114,7 +114,7 @@ class JSONTranslator(object):
'JSON was incorrect or not encoded as '
'UTF-8.')
def process_response(self, req, resp):
def process_response(self, req, resp, resource):
if 'result' not in req.context:
return