Author: kmtracey
Date: 2008-12-16 08:28:22 -0600 (Tue, 16 Dec 2008)
New Revision: 9654

Modified:
   django/trunk/django/db/backends/sqlite3/base.py
Log:
Fixed #9814 -- Allowed SafeStrings to be saved to sqlite DB when running on 
Python 2.6.


Modified: django/trunk/django/db/backends/sqlite3/base.py
===================================================================
--- django/trunk/django/db/backends/sqlite3/base.py     2008-12-16 14:26:02 UTC 
(rev 9653)
+++ django/trunk/django/db/backends/sqlite3/base.py     2008-12-16 14:28:22 UTC 
(rev 9654)
@@ -10,6 +10,7 @@
 from django.db.backends.sqlite3.client import DatabaseClient
 from django.db.backends.sqlite3.creation import DatabaseCreation
 from django.db.backends.sqlite3.introspection import DatabaseIntrospection
+from django.utils.safestring import SafeString                                 
                          
 
 try:
     try:
@@ -49,6 +50,7 @@
     # slow-down, this adapter is only registered for sqlite3 versions
     # needing it.
     Database.register_adapter(str, lambda s:s.decode('utf-8'))
+    Database.register_adapter(SafeString, lambda s:s.decode('utf-8'))
 
 class DatabaseFeatures(BaseDatabaseFeatures):
     # SQLite cannot handle us only partially reading from a cursor's result set


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to