Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.0.X] Fixed #9814 -- Allowed SafeStrings to be saved to sqlite DB w…

…hen running on Python 2.6.

r9654 from trunk, also updated merge metadata to reflect that all other bugfix changetsets have been merged.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 75ea7a434a5c5a8b2b040ad4461149430e6e03dd 1 parent 8cc518a
Karen Tracey authored December 16, 2008

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  django/db/backends/sqlite3/base.py
2  django/db/backends/sqlite3/base.py
@@ -10,6 +10,7 @@
10 10
 from django.db.backends.sqlite3.client import DatabaseClient
11 11
 from django.db.backends.sqlite3.creation import DatabaseCreation
12 12
 from django.db.backends.sqlite3.introspection import DatabaseIntrospection
  13
+from django.utils.safestring import SafeString                                                           
13 14
 
14 15
 try:
15 16
     try:
@@ -49,6 +50,7 @@
49 50
     # slow-down, this adapter is only registered for sqlite3 versions
50 51
     # needing it.
51 52
     Database.register_adapter(str, lambda s:s.decode('utf-8'))
  53
+    Database.register_adapter(SafeString, lambda s:s.decode('utf-8'))
52 54
 
53 55
 class DatabaseFeatures(BaseDatabaseFeatures):
54 56
     # SQLite cannot handle us only partially reading from a cursor's result set

0 notes on commit 75ea7a4

Please sign in to comment.
Something went wrong with that request. Please try again.