Index: django/views/debug.py
===================================================================
--- django/views/debug.py	(Revision 7367)
+++ django/views/debug.py	(Arbeitskopie)
@@ -2,6 +2,7 @@
 import re
 import sys
 import datetime
+import traceback
 
 from django.conf import settings
 from django.template import Template, Context, TemplateDoesNotExist
@@ -104,6 +105,10 @@
             })
     if settings.TEMPLATE_DEBUG and hasattr(exc_value, 'source'):
         exc_type, exc_value, tb, template_info = get_template_exception_info(exc_type, exc_value, tb)
+    original_exc_info=getattr(exc_value, 'original_exc_info', None)
+    if original_exc_info:
+        original_exc_info=''.join([smart_unicode(line, errors='replace') for line in traceback.format_exception(*original_exc_info)])
+                                   
     frames = []
     while tb is not None:
         # support for __traceback_hide__ which is used by a few libraries
@@ -165,6 +170,7 @@
         'template_info': template_info,
         'template_does_not_exist': template_does_not_exist,
         'loader_debug_info': loader_debug_info,
+        'original_exc_info': original_exc_info,
     })
     return t.render(c)
 
@@ -379,7 +385,13 @@
       <th>Exception Location:</th>
       <td>{{ lastframe.filename|escape }} in {{ lastframe.function|escape }}, line {{ lastframe.lineno }}</td>
     </tr>
+    {% if original_exc_info %}
     <tr>
+      <th>Original Exception:</th>
+      <td><pre>{{ original_exc_info|escape }}</pre></td>
+    </tr>
+    {% endif %}
+    <tr>
       <th>Python Executable:</th>
       <td>{{ sys_executable|escape }}</td>
     </tr>
Index: django/core/urlresolvers.py
===================================================================
--- django/core/urlresolvers.py	(Revision 7367)
+++ django/core/urlresolvers.py	(Arbeitskopie)
@@ -252,7 +256,8 @@
             except Exception, e:
                 # Either an invalid urlconf_name, such as "foo.bar.", or some
                 # kind of problem during the actual import.
-                raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e)
+                import sys
+                raise ImproperlyConfigured("Error while importing URLconf %r: %s" % (self.urlconf_name, e), original_exc_info=sys.exc_info())
             return self._urlconf_module
     urlconf_module = property(_get_urlconf_module)
 
Index: django/core/exceptions.py
===================================================================
--- django/core/exceptions.py	(Revision 7367)
+++ django/core/exceptions.py	(Arbeitskopie)
@@ -26,4 +26,6 @@
 
 class ImproperlyConfigured(Exception):
     "Django is somehow improperly configured"
-    pass
+    def __init__(self, msg, original_exc_info=None):
+        Exception.__init__(self, msg)
+        self.original_exc_info=original_exc_info
