2005-07-16 00:52:08 +08:00
|
|
|
"Global Django exceptions"
|
2005-07-13 09:25:57 +08:00
|
|
|
|
|
|
|
from django.core.template import SilentVariableFailure
|
|
|
|
|
|
|
|
class Http404(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
class ObjectDoesNotExist(SilentVariableFailure):
|
|
|
|
"The requested object does not exist"
|
|
|
|
pass
|
|
|
|
|
|
|
|
class SuspiciousOperation(Exception):
|
|
|
|
"The user did something suspicious"
|
|
|
|
pass
|
|
|
|
|
|
|
|
class PermissionDenied(Exception):
|
|
|
|
"The user did not have permission to do that"
|
|
|
|
pass
|
|
|
|
|
|
|
|
class ViewDoesNotExist(Exception):
|
|
|
|
"The requested view does not exist"
|
|
|
|
pass
|
|
|
|
|
|
|
|
class MiddlewareNotUsed(Exception):
|
|
|
|
"This middleware is not used in this server configuration"
|
2005-07-16 00:52:08 +08:00
|
|
|
pass
|
2005-07-17 06:12:24 +08:00
|
|
|
|
|
|
|
class ImproperlyConfigured(Exception):
|
|
|
|
"Django is somehow improperly configured"
|
|
|
|
pass
|