Loading django/contrib/gis/geos/geometry.py +2 −2 Original line number Diff line number Diff line Loading @@ -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." Loading django/contrib/gis/tests/geoapp/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -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: Loading docs/releases/1.8.txt +16 −7 Original line number Diff line number Diff line Loading @@ -558,6 +558,22 @@ run this query:: last_login=models.F('date_joined') ).update(last_login=None) :mod:`django.contrib.gis` ~~~~~~~~~~~~~~~~~~~~~~~~~ * Support for GEOS 3.1 and GDAL 1.6 has been dropped. * Support for SpatiaLite < 2.4 has been dropped. * GIS-specific lookups have been refactored to use the :class:`django.db.models.Lookup` API. * The default ``str`` representation of :class:`~django.contrib.gis.geos.GEOSGeometry` objects has been changed from WKT to EWKT format (including the SRID). As this representation is used in the serialization framework, that means that ``dumpdata`` output will now contain the SRID value of geometry objects. Miscellaneous ~~~~~~~~~~~~~ Loading @@ -573,13 +589,9 @@ Miscellaneous * ``URLField.to_python`` no longer adds a trailing slash to pathless URLs. * ``django.contrib.gis`` dropped support for GEOS 3.1 and GDAL 1.6. * The :tfilter:`length` template filter now returns ``0`` for an undefined variable, rather than an empty string. * Support for SpatiaLite < 2.4 has been dropped. * ``ForeignKey.default_error_message['invalid']`` has been changed from ``'%(model)s instance with pk %(pk)r does not exist.'`` to ``'%(model)s instance with %(field)s %(value)r does not exist.'`` If you are Loading Loading @@ -616,9 +628,6 @@ Miscellaneous :func:`~django.core.urlresolvers.reverse_lazy` now return Unicode strings instead of byte strings. * GIS-specific lookups have been refactored to use the :class:`django.db.models.Lookup` API. * The ``CacheClass`` shim has been removed from all cache backends. These aliases were provided for backwards compatibility with Django 1.3. If you are still using them, please update your project to use the real Loading Loading
django/contrib/gis/geos/geometry.py +2 −2 Original line number Diff line number Diff line Loading @@ -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." Loading
django/contrib/gis/tests/geoapp/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -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: Loading
docs/releases/1.8.txt +16 −7 Original line number Diff line number Diff line Loading @@ -558,6 +558,22 @@ run this query:: last_login=models.F('date_joined') ).update(last_login=None) :mod:`django.contrib.gis` ~~~~~~~~~~~~~~~~~~~~~~~~~ * Support for GEOS 3.1 and GDAL 1.6 has been dropped. * Support for SpatiaLite < 2.4 has been dropped. * GIS-specific lookups have been refactored to use the :class:`django.db.models.Lookup` API. * The default ``str`` representation of :class:`~django.contrib.gis.geos.GEOSGeometry` objects has been changed from WKT to EWKT format (including the SRID). As this representation is used in the serialization framework, that means that ``dumpdata`` output will now contain the SRID value of geometry objects. Miscellaneous ~~~~~~~~~~~~~ Loading @@ -573,13 +589,9 @@ Miscellaneous * ``URLField.to_python`` no longer adds a trailing slash to pathless URLs. * ``django.contrib.gis`` dropped support for GEOS 3.1 and GDAL 1.6. * The :tfilter:`length` template filter now returns ``0`` for an undefined variable, rather than an empty string. * Support for SpatiaLite < 2.4 has been dropped. * ``ForeignKey.default_error_message['invalid']`` has been changed from ``'%(model)s instance with pk %(pk)r does not exist.'`` to ``'%(model)s instance with %(field)s %(value)r does not exist.'`` If you are Loading Loading @@ -616,9 +628,6 @@ Miscellaneous :func:`~django.core.urlresolvers.reverse_lazy` now return Unicode strings instead of byte strings. * GIS-specific lookups have been refactored to use the :class:`django.db.models.Lookup` API. * The ``CacheClass`` shim has been removed from all cache backends. These aliases were provided for backwards compatibility with Django 1.3. If you are still using them, please update your project to use the real Loading