[3.1.x] Refs #32230 -- Fixed LayerMapping example in GeoDjango tutorial.
LayerMapping.data_source doesn't support pathlib.Path(). Regression in26554cf5d1
. Follow up toe46ca51c24
.
This commit is contained in:
parent
3a70c362ec
commit
2ab8b5f4f8
|
@ -453,7 +453,7 @@ with the following code::
|
|||
world_shp = Path(__file__).resolve().parent / 'data' / 'TM_WORLD_BORDERS-0.3.shp'
|
||||
|
||||
def run(verbose=True):
|
||||
lm = LayerMapping(WorldBorder, world_shp, world_mapping, transform=False)
|
||||
lm = LayerMapping(WorldBorder, str(world_shp), world_mapping, transform=False)
|
||||
lm.save(strict=True, verbose=verbose)
|
||||
|
||||
A few notes about what's going on:
|
||||
|
|
Loading…
Reference in New Issue