diff options
| author | Josh Smeaton <josh.smeaton@gmail.com> | 2014-11-22 14:14:43 +1100 |
|---|---|---|
| committer | Josh Smeaton <josh.smeaton@gmail.com> | 2014-12-27 15:27:27 +1100 |
| commit | 47182965465f47657cbab6858a6a8637cc32b2df (patch) | |
| tree | 73402d23e6752dc387dfc6aa35367572dff1a780 /django/db/backends/mysql/base.py | |
| parent | 7c07612e9045f8e1b881f321ea68a4bacb2d70df (diff) | |
Fixed #23753 -- Added a suite of SQL Functions
Added functions and tests
Added docs and more tests
Added TextField converter to mysql backend
Aliased Value as V in example docs and tests
Removed unicode_compatible in example
Fixed console emulation in examples
Diffstat (limited to 'django/db/backends/mysql/base.py')
| -rw-r--r-- | django/db/backends/mysql/base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 8fcc9e0db1..dcb22bc37c 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -396,6 +396,8 @@ class DatabaseOperations(BaseDatabaseOperations): converters.append(self.convert_booleanfield_value) if internal_type == 'UUIDField': converters.append(self.convert_uuidfield_value) + if internal_type == 'TextField': + converters.append(self.convert_textfield_value) return converters def convert_booleanfield_value(self, value, field): @@ -408,6 +410,11 @@ class DatabaseOperations(BaseDatabaseOperations): value = uuid.UUID(value) return value + def convert_textfield_value(self, value, field): + if value is not None: + value = force_text(value) + return value + class DatabaseWrapper(BaseDatabaseWrapper): vendor = 'mysql' |
