Django

Code

Changeset 3675

Show
Ignore:
Timestamp:
08/28/06 15:00:47 (2 years ago)
Author:
jacob
Message:

Made psycopg2 backend behave the same as the other backends when it comes to unicode and datetime time zone info. See the django-dev thread for details.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/backends/postgresql_psycopg2/base.py

    r3565 r3675  
    1111    from django.core.exceptions import ImproperlyConfigured 
    1212    raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e 
    13  
    14 # Register Unicode conversions 
    15 import psycopg2.extensions 
    16 psycopg2.extensions.register_type(psycopg2.extensions.UNICODE) 
    1713 
    1814DatabaseError = Database.DatabaseError 
     
    4844            self.connection.set_isolation_level(1) # make transactions transparent to all cursors 
    4945        cursor = self.connection.cursor() 
     46        cursor.tzinfo_factory = None 
    5047        cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) 
    5148        if settings.DEBUG: