summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-10-11 21:39:38 +0200
committerClaude Paroz <claude@2xlibre.net>2014-10-16 09:30:37 +0200
commit2e5b2c612ec3b410d2a35133d073341e6958eeba (patch)
tree58632f188e9947ba87653a345ffd5368891e0083 /django
parent374c14b7fd8a7ba06cebfa83dd40915a50796d3e (diff)
Fixed #23579 -- Changed GEOSGeometry.__str__ to include the SRID
Thanks Tim Graham for the review.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/gis/geos/geometry.py4
-rw-r--r--django/contrib/gis/tests/geoapp/tests.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/gis/geos/geometry.py b/django/contrib/gis/geos/geometry.py
index 9299d3e397..00094c93fe 100644
--- a/django/contrib/gis/geos/geometry.py
+++ b/django/contrib/gis/geos/geometry.py
@@ -134,8 +134,8 @@ class GEOSGeometry(GEOSBase, ListMixin):
return self.clone()
def __str__(self):
- "WKT is used for the string representation."
- return self.wkt
+ "EWKT is used for the string representation."
+ return self.ewkt
def __repr__(self):
"Short-hand representation because WKT may be very large."
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py
index d5a4cd541e..b9e7a58b70 100644
--- a/django/contrib/gis/tests/geoapp/tests.py
+++ b/django/contrib/gis/tests/geoapp/tests.py
@@ -214,7 +214,7 @@ class GeoModelTest(TestCase):
call_command('dumpdata', 'geoapp.City', stdout=out)
result = out.getvalue()
houston = City.objects.get(name='Houston')
- self.assertIn('"point": "%s"' % houston.point.wkt, result)
+ self.assertIn('"point": "%s"' % houston.point.ewkt, result)
# Reload now dumped data
with NamedTemporaryFile(mode='w', suffix='.json') as tempfile: