Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored July 16, 2005
4  django/core/exceptions.py
@@ -24,3 +24,7 @@ class ViewDoesNotExist(Exception):
24 24
 class MiddlewareNotUsed(Exception):
25 25
     "This middleware is not used in this server configuration"
26 26
     pass
  27
+
  28
+class ImproperlyConfigured(Exception):
  29
+    "Django is somehow improperly configured"
  30
+    pass
7  django/core/handler.py
@@ -5,9 +5,6 @@
5 5
 # settings) until after CoreHandler has been called; otherwise os.environ
6 6
 # won't be set up correctly (with respect to settings).
7 7
 
8  
-class ImproperlyConfigured(Exception):
9  
-    pass
10  
-
11 8
 class CoreHandler:
12 9
 
13 10
     def __init__(self):
@@ -57,11 +54,11 @@ def load_middleware(self):
57 54
             try:
58 55
                 mod = __import__(mw_module, '', '', [''])
59 56
             except ImportError, e:
60  
-                raise ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)
  57
+                raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)
61 58
             try:
62 59
                 mw_class = getattr(mod, mw_classname)
63 60
             except AttributeError:
64  
-                raise ImproperlyConfigured, 'Middleware module "%s" does not define a "%s" class' % (mw_module, mw_classname)
  61
+                raise exceptions.ImproperlyConfigured, 'Middleware module "%s" does not define a "%s" class' % (mw_module, mw_classname)
65 62
 
66 63
             try:
67 64
                 mw_instance = mw_class()

0 notes on commit 60bdadb

Please sign in to comment.
Something went wrong with that request. Please try again.