Ticket #7464: base.py.patch

File base.py.patch, 986 bytes (added by Digitalxero@…, 16 years ago)

Patch for the issue

  • base.py

     
    66
    77from django.db.backends import BaseDatabaseWrapper, BaseDatabaseFeatures
    88from django.db.backends.postgresql.operations import DatabaseOperations as PostgresqlDatabaseOperations
    9 from django.utils.safestring import SafeUnicode
     9from django.utils.safestring import SafeUnicode, SafeString
    1010try:
    1111    import psycopg2 as Database
    1212    import psycopg2.extensions
     
    1818IntegrityError = Database.IntegrityError
    1919
    2020psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
    21 psycopg2.extensions.register_adapter(SafeUnicode, psycopg2.extensions.QuotedString)
     21psycopg2.extensions.register_adapter(SafeUnicode, psycopg2.extensions.UNICODE)
     22psycopg2.extensions.register_adapter(SafeString, psycopg2.extensions.QuotedString)
    2223
    2324class DatabaseFeatures(BaseDatabaseFeatures):
    2425    needs_datetime_string_cast = False
Back to Top