Ticket #879: base.py.diff
File base.py.diff, 1011 bytes (added by , 19 years ago) |
---|
-
core/handlers/base.py
17 17 self._response_middleware = [] 18 18 self._exception_middleware = [] 19 19 for middleware_path in settings.MIDDLEWARE_CLASSES: 20 dot = middleware_path.rindex('.')21 mw_module, mw_classname = middleware_path[:dot], middleware_path[dot+1:]22 20 try: 21 dot = middleware_path.rindex('.') 22 mw_module, mw_classname = middleware_path[:dot], middleware_path[dot+1:] 23 except ValueError: 24 raise exceptions.ImproperlyConfigured, '"%s" does not look like a middleware module' % (middleware_path) 25 try: 23 26 mod = __import__(mw_module, '', '', ['']) 24 27 except ImportError, e: 25 28 raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)