GeoDjangoβs admin siteΒΆ
GISModelAdmin
ΒΆ
-
class
GISModelAdmin
ΒΆ -
gis_widget
ΒΆ The widget class to be used for
GeometryField
. Defaults toOSMWidget
.
-
gis_widget_kwargs
ΒΆ The keyword arguments that would be passed to the
gis_widget
. Defaults to an empty dictionary.
-
GeoModelAdmin
ΒΆ
-
class
GeoModelAdmin
ΒΆ -
default_lon
ΒΆ
The default center longitude.
-
default_lat
ΒΆ
The default center latitude.
-
default_zoom
ΒΆ
The default zoom level to use. Defaults to 4.
-
extra_js
ΒΆ
Sequence of URLs to any extra JavaScript to include.
-
map_template
ΒΆ
Override the template used to generate the JavaScript slippy map. Default is
'gis/admin/openlayers.html'
.-
map_width
ΒΆ
Width of the map, in pixels. Defaults to 600.
-
map_height
ΒΆ
Height of the map, in pixels. Defaults to 400.
-
openlayers_url
ΒΆ
Link to the URL of the OpenLayers JavaScript. Defaults to
'https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js'
.-
modifiable
ΒΆ
Defaults to
True
. When set toFalse
, disables editing of existing geometry fields in the admin.Note
This is different from adding the geometry field to
readonly_fields
, which will only display the WKT of the geometry. Settingmodifiable=False
, actually displays the geometry in a map, but disables the ability to edit its vertices.Deprecated since version 4.0: This class is deprecated. Use
ModelAdmin
instead.-
OSMGeoAdmin
ΒΆ
-
class
OSMGeoAdmin
ΒΆ A subclass of
GeoModelAdmin
that uses a Spherical Mercator projection with OpenStreetMap street data tiles.Deprecated since version 4.0: This class is deprecated. Use
GISModelAdmin
instead.