mirror of
https://github.com/django/django.git
synced 2025-07-17 16:19:12 +00:00
[3.1.x] Refs #32230 -- Fixed LayerMapping example in GeoDjango tutorial.
LayerMapping.data_source doesn't support pathlib.Path(). Regression in 26554cf5d1e96db10d0d5f4b69683a22fb82fdf8. Follow up to e46ca51c249677c52e04db28fc0c60ae1948b3b2.
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…
x
Reference in New Issue
Block a user