Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved django.core.handler.ImproperlyConfigured into django.core.excep…

…tions

git-svn-id: http://code.djangoproject.com/svn/django/trunk@120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 60bdadb9a3464a7f1f322655dc32d6a33d754be7 1 parent 980b3ce
@adrianholovaty adrianholovaty authored
Showing with 6 additions and 5 deletions.
  1. +4 −0 django/core/exceptions.py
  2. +2 −5 django/core/handler.py
View
4 django/core/exceptions.py
@@ -24,3 +24,7 @@ class ViewDoesNotExist(Exception):
class MiddlewareNotUsed(Exception):
"This middleware is not used in this server configuration"
pass
+
+class ImproperlyConfigured(Exception):
+ "Django is somehow improperly configured"
+ pass
View
7 django/core/handler.py
@@ -5,9 +5,6 @@
# settings) until after CoreHandler has been called; otherwise os.environ
# won't be set up correctly (with respect to settings).
-class ImproperlyConfigured(Exception):
- pass
-
class CoreHandler:
def __init__(self):
@@ -57,11 +54,11 @@ def load_middleware(self):
try:
mod = __import__(mw_module, '', '', [''])
except ImportError, e:
- raise ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)
+ raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)
try:
mw_class = getattr(mod, mw_classname)
except AttributeError:
- raise ImproperlyConfigured, 'Middleware module "%s" does not define a "%s" class' % (mw_module, mw_classname)
+ raise exceptions.ImproperlyConfigured, 'Middleware module "%s" does not define a "%s" class' % (mw_module, mw_classname)
try:
mw_instance = mw_class()
Please sign in to comment.
Something went wrong with that request. Please try again.