mirror of
https://github.com/django/django.git
synced 2025-03-30 03:00:45 +00:00
[1.9.x] Fixed #25398 -- Revised instances of os.path.join()
Replaced occurrences of os.path.join(BASE_DIR, 'folder/subfolder') to os.path.join(BASE_DIR, 'folder', 'subfolder') Backport of d2ef521a53 from master.
This commit is contained in:
parent
6a582d35f2
commit
0633d2285e
@ -327,7 +327,7 @@ tutorial, then you can determine its path using Python's built-in
|
|||||||
>>> import os
|
>>> import os
|
||||||
>>> import world
|
>>> import world
|
||||||
>>> world_shp = os.path.abspath(os.path.join(os.path.dirname(world.__file__),
|
>>> world_shp = os.path.abspath(os.path.join(os.path.dirname(world.__file__),
|
||||||
... 'data/TM_WORLD_BORDERS-0.3.shp'))
|
... 'data', 'TM_WORLD_BORDERS-0.3.shp'))
|
||||||
|
|
||||||
Now, open the world borders shapefile using GeoDjango's
|
Now, open the world borders shapefile using GeoDjango's
|
||||||
:class:`~django.contrib.gis.gdal.DataSource` interface::
|
:class:`~django.contrib.gis.gdal.DataSource` interface::
|
||||||
@ -452,7 +452,7 @@ with the following code::
|
|||||||
'mpoly' : 'MULTIPOLYGON',
|
'mpoly' : 'MULTIPOLYGON',
|
||||||
}
|
}
|
||||||
|
|
||||||
world_shp = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data/TM_WORLD_BORDERS-0.3.shp'))
|
world_shp = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data', 'TM_WORLD_BORDERS-0.3.shp'))
|
||||||
|
|
||||||
def run(verbose=True):
|
def run(verbose=True):
|
||||||
lm = LayerMapping(WorldBorder, world_shp, world_mapping,
|
lm = LayerMapping(WorldBorder, world_shp, world_mapping,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user