mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[1.10.x] Fixed #26021 -- Applied hanging indentation to docs.
Backport of 4a4d7f980e from master
This commit is contained in:
@@ -122,7 +122,7 @@ raster models::
|
||||
|
||||
>>> from django.contrib.gis.gdal import GDALRaster
|
||||
>>> rast = GDALRaster({'width': 10, 'height': 10, 'name': 'Canyon', 'srid': 4326,
|
||||
... 'scale': [0.1, -0.1]'bands': [{"data": range(100)}]}
|
||||
... 'scale': [0.1, -0.1], 'bands': [{"data": range(100)}]})
|
||||
>>> dem = Elevation(name='Canyon', rast=rast)
|
||||
>>> dem.save()
|
||||
|
||||
@@ -131,7 +131,7 @@ Note that this equivalent to::
|
||||
>>> dem = Elevation.objects.create(
|
||||
... name='Canyon',
|
||||
... rast={'width': 10, 'height': 10, 'name': 'Canyon', 'srid': 4326,
|
||||
... 'scale': [0.1, -0.1]'bands': [{"data": range(100)}]}
|
||||
... 'scale': [0.1, -0.1], 'bands': [{"data": range(100)}]},
|
||||
... )
|
||||
|
||||
.. _spatial-lookups-intro:
|
||||
|
||||
@@ -452,12 +452,15 @@ with the following code::
|
||||
'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):
|
||||
lm = LayerMapping(WorldBorder, world_shp, world_mapping,
|
||||
transform=False, encoding='iso-8859-1')
|
||||
|
||||
lm = LayerMapping(
|
||||
WorldBorder, world_shp, world_mapping,
|
||||
transform=False, encoding='iso-8859-1',
|
||||
)
|
||||
lm.save(strict=True, verbose=verbose)
|
||||
|
||||
A few notes about what's going on:
|
||||
|
||||
Reference in New Issue
Block a user