summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2006-08-28 20:00:47 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2006-08-28 20:00:47 +0000
commit0e577430e9c0b0848774227932050db037ae4e75 (patch)
treeea859159476c0f47db1eeada46a279fa5bf9cd09 /django/db
parent56264160a2c8fbbe4e36d7c3f804115b8f2e66a2 (diff)
Made psycopg2 backend behave the same as the other backends when it comes to unicode and datetime time zone info. See [http://groups.google.com/group/django-developers/browse_frm/thread/4575a3fe0d78e2e4/d607d96f7b422620#d607d96f7b422620 the django-dev thread] for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db')
-rw-r--r--django/db/backends/postgresql_psycopg2/base.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py
index 9623e68354..9cfef25cb3 100644
--- a/django/db/backends/postgresql_psycopg2/base.py
+++ b/django/db/backends/postgresql_psycopg2/base.py
@@ -11,10 +11,6 @@ except ImportError, e:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
-# Register Unicode conversions
-import psycopg2.extensions
-psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
-
DatabaseError = Database.DatabaseError
try:
@@ -47,6 +43,7 @@ class DatabaseWrapper(local):
self.connection = Database.connect(conn_string)
self.connection.set_isolation_level(1) # make transactions transparent to all cursors
cursor = self.connection.cursor()
+ cursor.tzinfo_factory = None
cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
if settings.DEBUG:
return util.CursorDebugWrapper(cursor, self)