=== modified file 'django/core/urlresolvers.py'
|
|
|
252 | 252 | except Exception, e: |
253 | 253 | # Either an invalid urlconf_name, such as "foo.bar.", or some |
254 | 254 | # kind of problem during the actual import. |
255 | | raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e) |
| 255 | from django.conf import settings |
| 256 | if settings.DEBUG: |
| 257 | raise |
| 258 | else: |
| 259 | raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e) |
256 | 260 | return self._urlconf_module |
257 | 261 | urlconf_module = property(_get_urlconf_module) |
258 | 262 | |