Fixed #2514 -- Improved psycopg2 backend to save/load Unicode strings correctly. Thanks, crankycoder@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-08-12 05:15:25 +00:00
parent 9ce3273127
commit 9cd0c333d6
2 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,7 @@ answer newbie questions, and generally made Django that much better:
Amit Chakradeo <http://amit.chakradeo.net/> Amit Chakradeo <http://amit.chakradeo.net/>
ChaosKCW ChaosKCW
Ian Clelland <clelland@gmail.com> Ian Clelland <clelland@gmail.com>
crankycoder@gmail.com
Matt Croydon <http://www.postneo.com/> Matt Croydon <http://www.postneo.com/>
Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/> Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/>
Jason Davies (Esaj) <http://www.jasondavies.com/> Jason Davies (Esaj) <http://www.jasondavies.com/>

View File

@ -11,6 +11,10 @@ except ImportError, e:
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
# Register Unicode conversions
import psycopg2.extensions
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
DatabaseError = Database.DatabaseError DatabaseError = Database.DatabaseError
try: try: