summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2013-10-06 21:28:17 +0200
committerClaude Paroz <claude@2xlibre.net>2013-10-06 21:29:39 +0200
commit8d75d1e1bc6052f934b3fc066cd362dae75e99a3 (patch)
treeb888ae46bf22895414c38a79df1ec04a67ab96d5
parent1df3c49a1a1c11198d181ddd0ce31bbb42e631d8 (diff)
Improved error message while setting GeometryProxy
-rw-r--r--django/contrib/gis/db/models/proxy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/gis/db/models/proxy.py b/django/contrib/gis/db/models/proxy.py
index 1fdc5036ba..fa4f941e70 100644
--- a/django/contrib/gis/db/models/proxy.py
+++ b/django/contrib/gis/db/models/proxy.py
@@ -59,7 +59,8 @@ class GeometryProxy(object):
# Set with None, WKT, HEX, or WKB
pass
else:
- raise TypeError('cannot set %s GeometryProxy with value of type: %s' % (obj.__class__.__name__, type(value)))
+ raise TypeError('Cannot set %s GeometryProxy (%s) with value of type: %s' % (
+ obj.__class__.__name__, gtype, type(value)))
# Setting the objects dictionary with the value, and returning.
obj.__dict__[self._field.attname] = value