Ensured :doc: role uses absolute targets in docs.

This commit is contained in:
Adam Johnson 2025-06-27 14:33:40 +01:00 committed by nessita
parent ae03f81ffa
commit 56955636e6
24 changed files with 247 additions and 237 deletions

View file

@ -1436,7 +1436,7 @@ default templates used by the :class:`ModelAdmin` views:
The ``delete_queryset()`` method is given the ``HttpRequest`` and a
``QuerySet`` of objects to be deleted. Override this method to customize
the deletion process for the "delete selected objects" :doc:`action
<actions>`.
</ref/contrib/admin/actions>`.
.. method:: ModelAdmin.save_formset(request, form, formset, change)
@ -2055,7 +2055,7 @@ default templates used by the :class:`ModelAdmin` views:
.. method:: ModelAdmin.get_deleted_objects(objs, request)
A hook for customizing the deletion process of the :meth:`delete_view` and
the "delete selected" :doc:`action <actions>`.
the "delete selected" :doc:`action </ref/contrib/admin/actions>`.
The ``objs`` argument is a homogeneous iterable of objects (a ``QuerySet``
or a list of model instances) to be deleted, and ``request`` is the

View file

@ -156,7 +156,7 @@ Geometry Lookups
----------------
Geographic queries with geometries take the following general form (assuming
the ``Zipcode`` model used in the :doc:`model-api`):
the ``Zipcode`` model used in the :doc:`/ref/contrib/gis/model-api`):
.. code-block:: text
@ -192,7 +192,8 @@ used to pass a band index. On the right hand side, a tuple of the raster and
band index can be specified.
This results in the following general form for lookups involving rasters
(assuming the ``Elevation`` model used in the :doc:`model-api`):
(assuming the ``Elevation`` model used in the
:doc:`/ref/contrib/gis/model-api`):
.. code-block:: text
@ -234,11 +235,10 @@ Distance Queries
Introduction
------------
Distance calculations with spatial data is tricky because, unfortunately,
the Earth is not flat. Some distance queries with fields in a geographic
coordinate system may have to be expressed differently because of
limitations in PostGIS. Please see the :ref:`selecting-an-srid` section
in the :doc:`model-api` documentation for more details.
Distance calculations with spatial data is tricky because, unfortunately, the
Earth is not flat. Some distance queries with fields in a geographic coordinate
system may have to be expressed differently because of limitations in PostGIS.
Please see the :ref:`selecting-an-srid` section for more details.
.. _distance-lookups-intro:

View file

@ -85,7 +85,8 @@ queryset is calculated:
express the value in the units of your choice. For example,
``city.distance.mi`` is the distance value in miles and
``city.distance.km`` is the distance value in kilometers. See
:doc:`measure` for usage details and the list of :ref:`supported_units`.
:doc:`/ref/contrib/gis/measure` for usage details and the list of
:ref:`supported_units`.
``GeometryDistance``
--------------------

View file

@ -22,9 +22,9 @@ familiarize yourself with Django first.
.. note::
GeoDjango has additional requirements beyond what Django requires --
please consult the :doc:`installation documentation <install/index>`
for more details.
GeoDjango has additional requirements beyond what Django requires -- please
consult the :doc:`installation documentation
</ref/contrib/gis/install/index>` for more details.
This tutorial will guide you through the creation of a geographic web
application for viewing the `world borders`_. [#]_ Some of the code
@ -49,8 +49,8 @@ Create a Spatial Database
Typically no special setup is required, so you can create a database as you
would for any other project. We provide some tips for selected databases:
* :doc:`install/postgis`
* :doc:`install/spatialite`
* :doc:`/ref/contrib/gis/install/postgis`
* :doc:`/ref/contrib/gis/install/spatialite`
Create a New Project
--------------------
@ -305,7 +305,7 @@ Importing Spatial Data
======================
This section will show you how to import the world borders shapefile into the
database via GeoDjango models using the :doc:`layermapping`.
database via GeoDjango models using the :doc:`/ref/contrib/gis/layermapping`.
There are many different ways to import data into a spatial database --
besides the tools included within GeoDjango, you may also use the following:
@ -531,11 +531,13 @@ Next, import the ``load`` module, call the ``run`` routine, and watch
Try ``ogrinspect``
------------------
Now that you've seen how to define geographic models and import data with the
:doc:`layermapping`, it's possible to further automate this process with
use of the :djadmin:`ogrinspect` management command. The :djadmin:`ogrinspect`
command introspects a GDAL-supported vector data source (e.g., a shapefile)
and generates a model definition and ``LayerMapping`` dictionary automatically.
:doc:`/ref/contrib/gis/layermapping`, it's possible to further automate this
process with use of the :djadmin:`ogrinspect` management command. The
:djadmin:`ogrinspect` command introspects a GDAL-supported vector data source
(e.g., a shapefile) and generates a model definition and ``LayerMapping``
dictionary automatically.
The general usage of the command goes as follows:
@ -637,10 +639,10 @@ a ``contains`` lookup using the ``pnt_wkt`` as the parameter:
Here, you retrieved a ``QuerySet`` with only one model: the border of the
United States (exactly what you would expect).
Similarly, you may also use a :doc:`GEOS geometry object <geos>`.
Here, you can combine the ``intersects`` spatial lookup with the ``get``
method to retrieve only the ``WorldBorder`` instance for San Marino instead
of a queryset:
Similarly, you may also use a :doc:`GEOS geometry object
</ref/contrib/gis/geos>`. Here, you can combine the ``intersects`` spatial
lookup with the ``get`` method to retrieve only the ``WorldBorder`` instance
for San Marino instead of a queryset:
.. code-block:: pycon
@ -649,8 +651,8 @@ of a queryset:
>>> WorldBorder.objects.get(mpoly__intersects=pnt)
<WorldBorder: San Marino>
The ``contains`` and ``intersects`` lookups are just a subset of the
available queries -- the :doc:`db-api` documentation has more.
The ``contains`` and ``intersects`` lookups are just a subset of the available
queries -- the :doc:`/ref/contrib/gis/db-api` documentation has more.
.. _automatic-spatial-transformations:
@ -748,7 +750,7 @@ Geographic annotations
GeoDjango also offers a set of geographic annotations to compute distances and
several other operations (intersection, difference, etc.). See the
:doc:`functions` documentation.
:doc:`/ref/contrib/gis/functions` documentation.
Putting your data on the map
============================