Index: django/http/multipartparser.py
===================================================================
--- django/http/multipartparser.py	(revision 17906)
+++ django/http/multipartparser.py	(working copy)
@@ -6,6 +6,7 @@
 """
 
 import cgi
+import sys
 from django.conf import settings
 from django.core.exceptions import SuspiciousOperation
 from django.utils.datastructures import MultiValueDict
@@ -198,7 +199,8 @@
                                     chunk = str(chunk).decode('base64')
                                 except Exception, e:
                                     # Since this is only a chunk, any error is an unfixable error.
-                                    raise MultiPartParserError("Could not decode base64 data: %r" % e)
+                                    msg = "Could not decode base64 data: %r" % e
+                                    raise MultiPartParserError, MultiPartParserError(msg), sys.exc_info()[2]
 
                             for i, handler in enumerate(handlers):
                                 chunk_length = len(chunk)
Index: django/test/testcases.py
===================================================================
--- django/test/testcases.py	(revision 17906)
+++ django/test/testcases.py	(working copy)
@@ -1116,8 +1116,8 @@
                     for port in range(extremes[0], extremes[1] + 1):
                         possible_ports.append(port)
         except Exception:
-            raise ImproperlyConfigured('Invalid address ("%s") for live '
-                'server.' % specified_address)
+            msg = 'Invalid address ("%s") for live server.' % specified_address
+            raise ImproperlyConfigured, ImproperlyConfigured(msg), sys.exc_info()[2]
         cls.server_thread = LiveServerThread(
             host, possible_ports, connections_override)
         cls.server_thread.daemon = True
Index: django/forms/util.py
===================================================================
--- django/forms/util.py	(revision 17906)
+++ django/forms/util.py	(working copy)
@@ -1,3 +1,5 @@
+import sys
+
 from django.conf import settings
 from django.utils.html import conditional_escape
 from django.utils.encoding import StrAndUnicode, force_unicode
@@ -67,11 +69,11 @@
         try:
             return timezone.make_aware(value, current_timezone)
         except Exception, e:
-            raise ValidationError(_('%(datetime)s couldn\'t be interpreted '
-                                    'in time zone %(current_timezone)s; it '
-                                    'may be ambiguous or it may not exist.')
-                                  % {'datetime': value,
-                                     'current_timezone': current_timezone})
+            msg = _(
+                '%(datetime)s couldn\'t be interpreted '
+                'in time zone %(current_timezone)s; it '
+                'may be ambiguous or it may not exist.') % {'datetime': value, 'current_timezone': current_timezone}
+            raise ValidationError, ValidationError(msg), sys.exc_info()[2]
     return value
 
 def to_current_timezone(value):
Index: django/forms/fields.py
===================================================================
--- django/forms/fields.py	(revision 17906)
+++ django/forms/fields.py	(working copy)
@@ -8,6 +8,7 @@
 import datetime
 import os
 import re
+import sys
 import urlparse
 from decimal import Decimal, DecimalException
 try:
@@ -579,7 +580,7 @@
             # raised. Catch and re-raise.
             raise
         except Exception: # Python Imaging Library doesn't recognize it as an image
-            raise ValidationError(self.error_messages['invalid_image'])
+            raise ValidationError, ValidationError(self.error_messages['invalid_image']), sys.exc_info()[2]
         if hasattr(f, 'seek') and callable(f.seek):
             f.seek(0)
         return f
Index: django/core/servers/basehttp.py
===================================================================
--- django/core/servers/basehttp.py	(revision 17906)
+++ django/core/servers/basehttp.py	(working copy)
@@ -119,7 +119,7 @@
         try:
             super(WSGIServer, self).server_bind()
         except Exception, e:
-            raise WSGIServerException(e)
+            raise WSGIServerException, WSGIServerException(e), sys.exc_info()[2]
         self.setup_environ()
 
 
Index: django/core/serializers/json.py
===================================================================
--- django/core/serializers/json.py	(revision 17906)
+++ django/core/serializers/json.py	(working copy)
@@ -4,6 +4,7 @@
 
 import datetime
 import decimal
+import sys
 from StringIO import StringIO
 
 from django.core.serializers.base import DeserializationError
@@ -44,7 +45,7 @@
         raise
     except Exception, e:
         # Map to deserializer error
-        raise DeserializationError(e)
+        raise DeserializationError, DeserializationError(e), sys.exc_info()[2]
 
 
 class DjangoJSONEncoder(simplejson.JSONEncoder):
Index: django/core/serializers/pyyaml.py
===================================================================
--- django/core/serializers/pyyaml.py	(revision 17906)
+++ django/core/serializers/pyyaml.py	(working copy)
@@ -6,6 +6,7 @@
 
 from StringIO import StringIO
 import decimal
+import sys
 import yaml
 
 from django.db import models
@@ -59,4 +60,4 @@
         raise
     except Exception, e:
         # Map to deserializer error
-        raise DeserializationError(e)
+        raise DeserializationError, DeserializationError(e), sys.exc_info()[2]
Index: django/core/management/commands/flush.py
===================================================================
--- django/core/management/commands/flush.py	(revision 17906)
+++ django/core/management/commands/flush.py	(working copy)
@@ -1,3 +1,5 @@
+import sys
+
 from optparse import make_option
 
 from django.conf import settings
@@ -57,12 +59,14 @@
                     cursor.execute(sql)
             except Exception, e:
                 transaction.rollback_unless_managed(using=db)
-                raise CommandError("""Database %s couldn't be flushed. Possible reasons:
-  * The database isn't running or isn't configured correctly.
-  * At least one of the expected database tables doesn't exist.
-  * The SQL was invalid.
-Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.
-The full error: %s""" % (connection.settings_dict['NAME'], e))
+                new_msg = (
+                    "Database %s couldn't be flushed. Possible reasons:\n"
+                    "  * The database isn't running or isn't configured correctly.\n"
+                    "  * At least one of the expected database tables doesn't exist.\n"
+                    "  * The SQL was invalid.\n"
+                    "Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.\n"
+                    "The full error: %s") % (connection.settings_dict['NAME'], e)
+                raise CommandError, CommandError(new_msg), sys.exc_info()[2]
             transaction.commit_unless_managed(using=db)
 
             # Emit the post sync signal. This allows individual
Index: django/templatetags/i18n.py
===================================================================
--- django/templatetags/i18n.py	(revision 17906)
+++ django/templatetags/i18n.py	(working copy)
@@ -1,4 +1,5 @@
 import re
+import sys
 
 from django.template import (Node, Variable, TemplateSyntaxError,
     TokenParser, Library, TOKEN_TEXT, TOKEN_VAR)
@@ -415,8 +416,10 @@
                 value = remaining_bits.pop(0)
                 value = parser.compile_filter(value)
             except Exception:
-                raise TemplateSyntaxError('"context" in %r tag expected '
-                                          'exactly one argument.' % bits[0])
+                msg = (
+                    '"context" in %r tag expected '
+                    'exactly one argument.') % bits[0]
+                raise TemplateSyntaxError, TemplateSyntaxError(msg), sys.exc_info()[2]
         else:
             raise TemplateSyntaxError('Unknown argument for %r tag: %r.' %
                                       (bits[0], option))
Index: django/contrib/gis/db/backends/spatialite/base.py
===================================================================
--- django/contrib/gis/db/backends/spatialite/base.py	(revision 17906)
+++ django/contrib/gis/db/backends/spatialite/base.py	(working copy)
@@ -1,3 +1,4 @@
+import sys
 from ctypes.util import find_library
 from django.conf import settings
 
@@ -57,8 +58,10 @@
             try:
                 cur.execute("SELECT load_extension(%s)", (self.spatialite_lib,))
             except Exception, msg:
-                raise ImproperlyConfigured('Unable to load the SpatiaLite library extension '
-                                           '"%s" because: %s' % (self.spatialite_lib, msg))
+                new_msg = (
+                    'Unable to load the SpatiaLite library extension '
+                    '"%s" because: %s') % (self.spatialite_lib, msg)
+                raise ImproperlyConfigured, ImproperlyConfigured(new_msg), sys.exc_info()[2]
             return cur
         else:
             return self.connection.cursor(factory=SQLiteCursorWrapper)
Index: django/contrib/gis/db/backends/spatialite/operations.py
===================================================================
--- django/contrib/gis/db/backends/spatialite/operations.py	(revision 17906)
+++ django/contrib/gis/db/backends/spatialite/operations.py	(working copy)
@@ -1,4 +1,5 @@
 import re
+import sys
 from decimal import Decimal
 
 from django.contrib.gis.db.backends.base import BaseSpatialOperations
@@ -123,10 +124,12 @@
         except ImproperlyConfigured:
             raise
         except Exception, msg:
-            raise ImproperlyConfigured('Cannot determine the SpatiaLite version for the "%s" '
-                                       'database (error was "%s").  Was the SpatiaLite initialization '
-                                       'SQL loaded on this database?' %
-                                       (self.connection.settings_dict['NAME'], msg))
+            new_msg = (
+                'Cannot determine the SpatiaLite version for the "%s" '
+                'database (error was "%s").  Was the SpatiaLite initialization '
+                'SQL loaded on this database?') %
+                                       (self.connection.settings_dict['NAME'], msg)
+            raise ImproperlyConfigured, ImproperlyConfigured(new_msg), sys.exc_info()[2]
 
         # Creating the GIS terms dictionary.
         gis_terms = ['isnull']
Index: django/contrib/gis/db/backends/oracle/introspection.py
===================================================================
--- django/contrib/gis/db/backends/oracle/introspection.py	(revision 17906)
+++ django/contrib/gis/db/backends/oracle/introspection.py	(working copy)
@@ -1,3 +1,4 @@
+import sys
 import cx_Oracle
 from django.db.backends.oracle.introspection import DatabaseIntrospection
 
@@ -17,8 +18,11 @@
                                (table_name.upper(), geo_col.upper()))
                 row = cursor.fetchone()
             except Exception, msg:
-                raise Exception('Could not find entry in USER_SDO_GEOM_METADATA corresponding to "%s"."%s"\n'
-                                'Error message: %s.' % (table_name, geo_col, msg))
+                new_msg = (
+                    'Could not find entry in USER_SDO_GEOM_METADATA '
+                    'corresponding to "%s"."%s"\n'
+                    'Error message: %s.') % (table_name, geo_col, msg)
+                raise Exception, Exception(new_msg), sys.exc_info()[2]
 
             # TODO: Research way to find a more specific geometry field type for
             # the column's contents.
Index: django/contrib/gis/utils/layermapping.py
===================================================================
--- django/contrib/gis/utils/layermapping.py	(revision 17906)
+++ django/contrib/gis/utils/layermapping.py	(working copy)
@@ -431,7 +431,8 @@
             # Creating the CoordTransform object
             return CoordTransform(self.source_srs, target_srs)
         except Exception, msg:
-            raise LayerMapError('Could not translate between the data source and model geometry: %s' % msg)
+            new_msg = 'Could not translate between the data source and model geometry: %s' % msg
+            raise LayerMapError, LayerMapError(new_msg), sys.exc_info()[2]
 
     def geometry_field(self):
         "Returns the GeometryField instance associated with the geographic column."
Index: django/contrib/admin/views/main.py
===================================================================
--- django/contrib/admin/views/main.py	(revision 17906)
+++ django/contrib/admin/views/main.py	(working copy)
@@ -1,4 +1,5 @@
 import operator
+import sys
 
 from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
 from django.core.paginator import InvalidPage
@@ -322,7 +323,7 @@
             # invalid if the keyword arguments are incorrect, or if the values
             # are not in the correct type, so we might get FieldError,
             # ValueError, ValidationError, or ?.
-            raise IncorrectLookupParameters(e)
+            raise IncorrectLookupParameters, IncorrectLookupParameters(e), sys.exc_info()[2]
 
         # Use select_related() if one of the list_display options is a field
         # with a relationship and the provided queryset doesn't already have
Index: django/utils/http.py
===================================================================
--- django/utils/http.py	(revision 17906)
+++ django/utils/http.py	(working copy)
@@ -136,7 +136,7 @@
         result = datetime.datetime(year, month, day, hour, min, sec)
         return calendar.timegm(result.utctimetuple())
     except Exception:
-        raise ValueError("%r is not a valid date" % date)
+        raise ValueError, ValueError("%r is not a valid date" % date), sys.exc_info()[2]
 
 def parse_http_date_safe(date):
     """
