Merge pull request #14 from ryanpetrello/master
pecan.abort now proxies keyword arguments through to webob.exc implementations.
This commit is contained in:
@@ -55,7 +55,7 @@ def override_template(template, content_type=None):
|
|||||||
request.pecan['override_content_type'] = content_type
|
request.pecan['override_content_type'] = content_type
|
||||||
|
|
||||||
|
|
||||||
def abort(status_code=None, detail='', headers=None, comment=None):
|
def abort(status_code=None, detail='', headers=None, comment=None, **kw):
|
||||||
'''
|
'''
|
||||||
Raise an HTTP status code, as specified. Useful for returning status
|
Raise an HTTP status code, as specified. Useful for returning status
|
||||||
codes like 401 Unauthorized or 403 Forbidden.
|
codes like 401 Unauthorized or 403 Forbidden.
|
||||||
@@ -66,7 +66,7 @@ def abort(status_code=None, detail='', headers=None, comment=None):
|
|||||||
:param comment: A comment to include in the response.
|
:param comment: A comment to include in the response.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
raise exc.status_map[status_code](detail=detail, headers=headers, comment=comment)
|
raise exc.status_map[status_code](detail=detail, headers=headers, comment=comment, **kw)
|
||||||
|
|
||||||
|
|
||||||
def redirect(location, internal=False, code=None, headers={}):
|
def redirect(location, internal=False, code=None, headers={}):
|
||||||
|
|||||||
Reference in New Issue
Block a user