Skip to content

Commit

Permalink
[1.0.X] Fixed #9814 -- Allowed SafeStrings to be saved to sqlite DB w…
Browse files Browse the repository at this point in the history
…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
kmtracey committed Dec 16, 2008
1 parent 8cc518a commit 75ea7a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/db/backends/sqlite3/base.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 75ea7a4

Please sign in to comment.