diff options
author | Adrian Holovaty <adrian@holovaty.com> | 2006-08-12 05:15:25 +0000 |
---|---|---|
committer | Adrian Holovaty <adrian@holovaty.com> | 2006-08-12 05:15:25 +0000 |
commit | 9cd0c333d6c0d9fd70dfb36c240749189bc19acd (patch) | |
tree | 0e49d3f0136d001a41fd67ded7a4fae338a9b054 | |
parent | 9ce32731274b288d254198aa027fd5316135dfdd (diff) | |
download | django-9cd0c333d6c0d9fd70dfb36c240749189bc19acd.tar.gz |
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
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | django/db/backends/postgresql_psycopg2/base.py | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -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/> diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 55cba81b70..9623e68354 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -11,6 +11,10 @@ except ImportError, e: 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: |