Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 9cd0c333d6c0d9fd70dfb36c240749189bc19acd 1 parent 9ce3273
@adrianholovaty adrianholovaty authored
Showing with 5 additions and 0 deletions.
  1. +1 −0  AUTHORS
  2. +4 −0 django/db/backends/postgresql_psycopg2/base.py
View
1  AUTHORS
@@ -60,6 +60,7 @@ answer newbie questions, and generally made Django that much better:
Amit Chakradeo <http://amit.chakradeo.net/>
ChaosKCW
Ian Clelland <clelland@gmail.com>
+ crankycoder@gmail.com
Matt Croydon <http://www.postneo.com/>
Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/>
Jason Davies (Esaj) <http://www.jasondavies.com/>
View
4 django/db/backends/postgresql_psycopg2/base.py
@@ -11,6 +11,10 @@
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
+# Register Unicode conversions
+import psycopg2.extensions
+psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
+
DatabaseError = Database.DatabaseError
try:
Please sign in to comment.
Something went wrong with that request. Please try again.