summaryrefslogtreecommitdiff
path: root/docs/ref/contrib/gis/tutorial.txt
diff options
context:
space:
mode:
authorGiannis Adamopoulos <gadamopoulos@outlook.com>2020-12-09 19:12:56 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-17 08:56:16 +0200
commit4555aa0a489cb9dcf764edf12339097cdfa5ff84 (patch)
tree45862fd927ecc343590ed0827af911dd9002c266 /docs/ref/contrib/gis/tutorial.txt
parentb5bf026813ca9aff83243f901edd722e0d60c2ea (diff)
Fixed #27674 -- Deprecated GeoModelAdmin and OSMGeoAdmin.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'docs/ref/contrib/gis/tutorial.txt')
-rw-r--r--docs/ref/contrib/gis/tutorial.txt34
1 files changed, 16 insertions, 18 deletions
diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt
index 0bdd09e163..1b8f54495a 100644
--- a/docs/ref/contrib/gis/tutorial.txt
+++ b/docs/ref/contrib/gis/tutorial.txt
@@ -697,26 +697,26 @@ Putting your data on the map
Geographic Admin
----------------
-GeoDjango extends :doc:`Django's admin application </ref/contrib/admin/index>`
-with support for editing geometry fields.
+:doc:`Django's admin application </ref/contrib/admin/index>` supports editing
+geometry fields.
Basics
~~~~~~
-GeoDjango also supplements the Django admin by allowing users to create
-and modify geometries on a JavaScript slippy map (powered by `OpenLayers`_).
+The Django admin allows users to create and modify geometries on a JavaScript
+slippy map (powered by `OpenLayers`_).
-Let's dive right in. Create a file called ``admin.py`` inside the
-``world`` application with the following code::
+Let's dive right in. Create a file called ``admin.py`` inside the ``world``
+application with the following code::
from django.contrib.gis import admin
from .models import WorldBorder
- admin.site.register(WorldBorder, admin.GeoModelAdmin)
+ admin.site.register(WorldBorder, admin.ModelAdmin)
Next, edit your ``urls.py`` in the ``geodjango`` application folder as follows::
- from django.contrib.gis import admin
+ from django.contrib import admin
from django.urls import include, path
urlpatterns = [
@@ -745,24 +745,22 @@ position.
.. _Vector Map Level 0: http://web.archive.org/web/20201024202709/https://earth-info.nga.mil/publications/vmap0.html
.. _OSGeo: https://www.osgeo.org/
-.. _osmgeoadmin-intro:
-
-``OSMGeoAdmin``
-~~~~~~~~~~~~~~~
+``GISModelAdmin``
+~~~~~~~~~~~~~~~~~
-With the :class:`~django.contrib.gis.admin.OSMGeoAdmin`, GeoDjango uses
-an `OpenStreetMap`_ layer in the admin.
+With the :class:`~django.contrib.gis.admin.GISModelAdmin`, GeoDjango uses an
+`OpenStreetMap`_ layer in the admin.
This provides more context (including street and thoroughfare details) than
-available with the :class:`~django.contrib.gis.admin.GeoModelAdmin`
-(which uses the `Vector Map Level 0`_ WMS dataset hosted at `OSGeo`_).
+available with the :class:`~django.contrib.admin.ModelAdmin` (which uses the
+`Vector Map Level 0`_ WMS dataset hosted at `OSGeo`_).
The PROJ datum shifting files must be installed (see the :ref:`PROJ
installation instructions <proj4>` for more details).
-If you meet this requirement, then substitute the ``OSMGeoAdmin`` option class
+If you meet this requirement, then use the ``GISModelAdmin`` option class
in your ``admin.py`` file::
- admin.site.register(WorldBorder, admin.OSMGeoAdmin)
+ admin.site.register(WorldBorder, admin.GISModelAdmin)
.. rubric:: Footnotes