123 #1

Closed
innov wants to merge 8 commits from stable/0.90.x into stable/0.91.x
1 changed files with 2 additions and 2 deletions
Showing only changes of commit eb97c80010 - Show all commits

View File

@ -47,7 +47,7 @@ class DatabaseWrapper:
self.queries = []
def cursor(self):
from django.conf.settings import DATABASE_USER, DATABASE_NAME, DATABASE_HOST, DATABASE_PORT, DATABASE_PASSWORD, DEBUG, TIME_ZONE
from django.conf.settings import DATABASE_USER, DATABASE_NAME, DATABASE_HOST, DATABASE_PORT, DATABASE_PASSWORD, DEBUG, DEFAULT_CHARSET, TIME_ZONE
if self.connection is None:
if DATABASE_NAME == '':
from django.core.exceptions import ImproperlyConfigured
@ -65,7 +65,7 @@ class DatabaseWrapper:
self.connection.set_isolation_level(1) # make transactions transparent to all cursors
cursor = self.connection.cursor()
cursor.execute("SET TIME ZONE %s", [TIME_ZONE])
cursor = UnicodeCursorWrapper(cursor, settings.DEFAULT_CHARSET)
cursor = UnicodeCursorWrapper(cursor, DEFAULT_CHARSET)
if DEBUG:
return base.CursorDebugWrapper(cursor, self)
return cursor