From a0cfd77971dc0e61427ca468e9b6ea9a548c796e Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 27 Oct 2014 16:10:35 +0100 Subject: [PATCH] [1.7.x] Added GeoDjango compatibility with mysqlclient driver Thanks Tim Graham for helping on that issue. --- django/contrib/gis/db/models/proxy.py | 2 +- docs/releases/1.7.2.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/django/contrib/gis/db/models/proxy.py b/django/contrib/gis/db/models/proxy.py index 91ded31dc01..a866910014d 100644 --- a/django/contrib/gis/db/models/proxy.py +++ b/django/contrib/gis/db/models/proxy.py @@ -57,7 +57,7 @@ class GeometryProxy(object): # Assigning the SRID to the geometry. if value.srid is None: value.srid = self._field.srid - elif value is None or isinstance(value, six.string_types + (memoryview,)): + elif value is None or isinstance(value, six.string_types + (bytes, memoryview)): # Set with None, WKT, HEX, or WKB pass else: diff --git a/docs/releases/1.7.2.txt b/docs/releases/1.7.2.txt index a28a86d551e..2736f5ec247 100644 --- a/docs/releases/1.7.2.txt +++ b/docs/releases/1.7.2.txt @@ -24,3 +24,5 @@ Bugfixes * Fixed a :djadmin:`makemessages` regression in 1.7.1 when :setting:`STATIC_ROOT` has the default ``None`` value (:ticket:`23717`). + +* Added GeoDjango compatibility with mysqlclient database driver.