mirror of
https://github.com/django/django.git
synced 2025-08-26 11:49:12 +00:00
Refs #36485 -- Removed double spaces after periods in sentences.
This commit is contained in:
parent
01a460f23e
commit
4286a23df6
@ -1355,9 +1355,9 @@ subclass::
|
|||||||
Custom template options
|
Custom template options
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The :ref:`admin-overriding-templates` section describes how to override or extend
|
The :ref:`admin-overriding-templates` section describes how to override or
|
||||||
the default admin templates. Use the following options to override the default
|
extend the default admin templates. Use the following options to override the
|
||||||
templates used by the :class:`ModelAdmin` views:
|
default templates used by the :class:`ModelAdmin` views:
|
||||||
|
|
||||||
.. attribute:: ModelAdmin.add_form_template
|
.. attribute:: ModelAdmin.add_form_template
|
||||||
|
|
||||||
|
@ -460,12 +460,12 @@ the values given in the given pattern. This lookup requires a tuple parameter,
|
|||||||
MariaDB, PostGIS, and SpatiaLite
|
MariaDB, PostGIS, and SpatiaLite
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
On these spatial backends the intersection pattern is a string comprising
|
On these spatial backends the intersection pattern is a string comprising nine
|
||||||
nine characters, which define intersections between the interior, boundary,
|
characters, which define intersections between the interior, boundary, and
|
||||||
and exterior of the geometry field and the lookup geometry.
|
exterior of the geometry field and the lookup geometry. The intersection
|
||||||
The intersection pattern matrix may only use the following characters:
|
pattern matrix may only use the following characters: ``1``, ``2``, ``T``,
|
||||||
``1``, ``2``, ``T``, ``F``, or ``*``. This lookup type allows users to "fine tune"
|
``F``, or ``*``. This lookup type allows users to "fine tune" a specific
|
||||||
a specific geometric relationship consistent with the DE-9IM model. [#fnde9im]_
|
geometric relationship consistent with the DE-9IM model. [#fnde9im]_
|
||||||
|
|
||||||
Geometry example::
|
Geometry example::
|
||||||
|
|
||||||
|
@ -922,12 +922,13 @@ Prepared Geometries
|
|||||||
===================
|
===================
|
||||||
|
|
||||||
In order to obtain a prepared geometry, access the
|
In order to obtain a prepared geometry, access the
|
||||||
:attr:`GEOSGeometry.prepared` property. Once you have a
|
:attr:`GEOSGeometry.prepared` property. Once you have a ``PreparedGeometry``
|
||||||
``PreparedGeometry`` instance its spatial predicate methods, listed below,
|
instance its spatial predicate methods, listed below, may be used with other
|
||||||
may be used with other ``GEOSGeometry`` objects. An operation with a prepared
|
``GEOSGeometry`` objects. An operation with a prepared geometry can be orders
|
||||||
geometry can be orders of magnitude faster -- the more complex the geometry
|
of magnitude faster -- the more complex the geometry that is prepared, the
|
||||||
that is prepared, the larger the speedup in the operation. For more information,
|
larger the speedup in the operation. For more information, please consult the
|
||||||
please consult the `GEOS wiki page on prepared geometries <https://trac.osgeo.org/geos/wiki/PreparedGeometry>`_.
|
`GEOS wiki page on prepared geometries
|
||||||
|
<https://trac.osgeo.org/geos/wiki/PreparedGeometry>`_.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -14,9 +14,10 @@ Specifically, it implements two objects, :class:`Distance` and
|
|||||||
Example
|
Example
|
||||||
=======
|
=======
|
||||||
|
|
||||||
:class:`Distance` objects may be instantiated using a keyword argument indicating the
|
:class:`Distance` objects may be instantiated using a keyword argument
|
||||||
context of the units. In the example below, two different distance objects are
|
indicating the context of the units. In the example below, two different
|
||||||
instantiated in units of kilometers (``km``) and miles (``mi``):
|
distance objects are instantiated in units of kilometers (``km``) and miles
|
||||||
|
(``mi``):
|
||||||
|
|
||||||
.. code-block:: pycon
|
.. code-block:: pycon
|
||||||
|
|
||||||
|
@ -130,21 +130,22 @@ are not.
|
|||||||
|
|
||||||
Most people are familiar with using latitude and longitude to reference a
|
Most people are familiar with using latitude and longitude to reference a
|
||||||
location on the earth's surface. However, latitude and longitude are angles,
|
location on the earth's surface. However, latitude and longitude are angles,
|
||||||
not distances. In other words, while the shortest path between two points on
|
not distances. In other words, while the shortest path between two points on a
|
||||||
a flat surface is a straight line, the shortest path between two points on a curved
|
flat surface is a straight line, the shortest path between two points on a
|
||||||
surface (such as the earth) is an *arc* of a `great circle`__. [#fnthematic]_ Thus,
|
curved surface (such as the earth) is an *arc* of a `great circle`__.
|
||||||
additional computation is required to obtain distances in planar units (e.g.,
|
[#fnthematic]_
|
||||||
kilometers and miles). Using a geographic coordinate system may introduce
|
|
||||||
complications for the developer later on. For example, SpatiaLite does not have
|
Thus, additional computation is required to obtain distances in planar units
|
||||||
the capability to perform distance calculations between geometries using
|
(e.g., kilometers and miles). Using a geographic coordinate system may
|
||||||
geographic coordinate systems, e.g. constructing a query to find all points
|
introduce complications for the developer later on. For example, SpatiaLite
|
||||||
within 5 miles of a county boundary stored as WGS84.
|
does not have the capability to perform distance calculations between
|
||||||
[#fndist]_
|
geometries using geographic coordinate systems, e.g. constructing a query to
|
||||||
|
find all points within 5 miles of a county boundary stored as WGS84. [#fndist]_
|
||||||
|
|
||||||
Portions of the earth's surface may projected onto a two-dimensional, or
|
Portions of the earth's surface may projected onto a two-dimensional, or
|
||||||
Cartesian, plane. Projected coordinate systems are especially convenient
|
Cartesian, plane. Projected coordinate systems are especially convenient for
|
||||||
for region-specific applications, e.g., if you know that your database will
|
region-specific applications, e.g., if you know that your database will only
|
||||||
only cover geometries in `North Kansas`__, then you may consider using projection
|
cover geometries in `North Kansas`__, then you may consider using projection
|
||||||
system specific to that region. Moreover, projected coordinate systems are
|
system specific to that region. Moreover, projected coordinate systems are
|
||||||
defined in Cartesian units (such as meters or feet), easing distance
|
defined in Cartesian units (such as meters or feet), easing distance
|
||||||
calculations.
|
calculations.
|
||||||
|
@ -714,14 +714,14 @@ For each field, we describe the default widget used if you don't specify
|
|||||||
.. attribute:: allow_files
|
.. attribute:: allow_files
|
||||||
|
|
||||||
Optional. Either ``True`` or ``False``. Default is ``True``. Specifies
|
Optional. Either ``True`` or ``False``. Default is ``True``. Specifies
|
||||||
whether files in the specified location should be included. Either this or
|
whether files in the specified location should be included. Either this
|
||||||
:attr:`allow_folders` must be ``True``.
|
or :attr:`allow_folders` must be ``True``.
|
||||||
|
|
||||||
.. attribute:: allow_folders
|
.. attribute:: allow_folders
|
||||||
|
|
||||||
Optional. Either ``True`` or ``False``. Default is ``False``. Specifies
|
Optional. Either ``True`` or ``False``. Default is ``False``. Specifies
|
||||||
whether folders in the specified location should be included. Either this or
|
whether folders in the specified location should be included. Either
|
||||||
:attr:`allow_files` must be ``True``.
|
this or :attr:`allow_files` must be ``True``.
|
||||||
|
|
||||||
|
|
||||||
``FloatField``
|
``FloatField``
|
||||||
|
@ -41,7 +41,8 @@ model system.
|
|||||||
|
|
||||||
Note also that Django stores signal handlers as weak references by default,
|
Note also that Django stores signal handlers as weak references by default,
|
||||||
so if your handler is a local function, it may be garbage collected. To
|
so if your handler is a local function, it may be garbage collected. To
|
||||||
prevent this, pass ``weak=False`` when you call the signal's :meth:`~django.dispatch.Signal.connect`.
|
prevent this, pass ``weak=False`` when you call the signal's
|
||||||
|
:meth:`~django.dispatch.Signal.connect`.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user