Fixed #32230 -- Made DataSource support pathlib.Path.

This commit is contained in:
Hasan Ramezani 2020-11-27 18:58:28 +01:00 committed by Mariusz Felisiak
parent 3828879eee
commit b37be072a2
5 changed files with 16 additions and 2 deletions

View file

@ -92,6 +92,10 @@ each feature in that layer.
Returns the name of the data source.
.. versionchanged:: 3.2
Support for :class:`pathlib.Path` ``ds_input`` was added.
__ https://gdal.org/drivers/vector/
``Layer``

View file

@ -331,7 +331,7 @@ Now, open the world borders shapefile using GeoDjango's
:class:`~django.contrib.gis.gdal.DataSource` interface::
>>> from django.contrib.gis.gdal import DataSource
>>> ds = DataSource(str(world_shp))
>>> ds = DataSource(world_shp)
>>> print(ds)
/ ... /geodjango/world/data/TM_WORLD_BORDERS-0.3.shp (ESRI Shapefile)