mirror of
https://github.com/django/django.git
synced 2025-07-05 10:19:20 +00:00
unicode: Removed stray reference to non-existent settings.DATABASE_CHARSET.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@4972 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b493b7e3cf
commit
e5adc5a427
@ -83,16 +83,14 @@ class DatabaseWrapper(local):
|
|||||||
cursor = self.connection.cursor()
|
cursor = self.connection.cursor()
|
||||||
if set_tz:
|
if set_tz:
|
||||||
cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
|
cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
|
||||||
if not settings.DATABASE_CHARSET:
|
|
||||||
cursor.execute("SHOW client_encoding")
|
cursor.execute("SHOW client_encoding")
|
||||||
encoding = ENCODING_MAP[cursor.fetchone()[0]]
|
encoding = ENCODING_MAP[cursor.fetchone()[0]]
|
||||||
else:
|
|
||||||
encoding = settings.DATABASE_CHARSET
|
|
||||||
cursor = UnicodeCursorWrapper(cursor, encoding)
|
cursor = UnicodeCursorWrapper(cursor, encoding)
|
||||||
global client_encoding
|
global client_encoding
|
||||||
if not client_encoding:
|
if not client_encoding:
|
||||||
# We assume the client encoding isn't going to change for random
|
# We assume the client encoding isn't going to change for random
|
||||||
# reasons.
|
# reasons.
|
||||||
|
Database.register_type(Database.new_type(Database.types[1043].values, 'STRING', typecast_string))
|
||||||
client_encoding = encoding
|
client_encoding = encoding
|
||||||
global postgres_version
|
global postgres_version
|
||||||
if not postgres_version:
|
if not postgres_version:
|
||||||
@ -268,7 +266,6 @@ except AttributeError:
|
|||||||
Database.register_type(Database.new_type((1083,1266), "TIME", util.typecast_time))
|
Database.register_type(Database.new_type((1083,1266), "TIME", util.typecast_time))
|
||||||
Database.register_type(Database.new_type((1114,1184), "TIMESTAMP", util.typecast_timestamp))
|
Database.register_type(Database.new_type((1114,1184), "TIMESTAMP", util.typecast_timestamp))
|
||||||
Database.register_type(Database.new_type((16,), "BOOLEAN", util.typecast_boolean))
|
Database.register_type(Database.new_type((16,), "BOOLEAN", util.typecast_boolean))
|
||||||
Database.register_type(Database.new_type(Database.types[1043].values, 'STRING', typecast_string))
|
|
||||||
|
|
||||||
OPERATOR_MAPPING = {
|
OPERATOR_MAPPING = {
|
||||||
'exact': '= %s',
|
'exact': '= %s',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user