Add forbidden()
convenience method to core View class
This commit is contained in:
parent
59d3a18b3f
commit
c8e689712a
|
@ -72,6 +72,12 @@ class View(object):
|
|||
"""
|
||||
return getattr(self.request, 'rattail_config', None)
|
||||
|
||||
def forbidden(self):
|
||||
"""
|
||||
Convenience method, to raise a HTTP 403 Forbidden exception.
|
||||
"""
|
||||
return httpexceptions.HTTPForbidden()
|
||||
|
||||
def notfound(self):
|
||||
return httpexceptions.HTTPNotFound()
|
||||
|
||||
|
|
Loading…
Reference in a new issue