mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #32230 -- Made DataSource support pathlib.Path.
This commit is contained in:
parent
3828879eee
commit
b37be072a2
5 changed files with 16 additions and 2 deletions
|
@ -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``
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue