Ticket #10360: custom-forbidden-msg.diff
File custom-forbidden-msg.diff, 852 bytes (added by , 16 years ago) |
---|
-
core/handlers/base.py
class BaseHandler(object): 116 116 return self.handle_uncaught_exception(request, resolver, sys.exc_info()) 117 117 finally: 118 118 receivers = signals.got_request_exception.send(sender=self.__class__, request=request) 119 except exceptions.PermissionDenied :120 return http.HttpResponseForbidden( '<h1>Permission denied</h1>')119 except exceptions.PermissionDenied, e: 120 return http.HttpResponseForbidden(e.message or '<h1>Permission denied</h1>') 121 121 except SystemExit: 122 122 # Allow sys.exit() to actually exit. See tickets #1023 and #4701 123 123 raise