[3.1.x] Refs #32230 -- Fixed LayerMapping example in GeoDjango tutorial.

LayerMapping.data_source doesn't support pathlib.Path().

Regression in 26554cf5d1.

Follow up to e46ca51c24.
This commit is contained in:
Mariusz Felisiak 2020-11-28 09:22:34 +01:00 committed by GitHub
parent 3a70c362ec
commit 2ab8b5f4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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: