diff options
| author | Elif T. Kus <elifkus@gmail.com> | 2016-01-03 12:56:22 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-22 12:12:17 -0500 |
| commit | bca9faae95db2a92e540fbd08505c134639916fe (patch) | |
| tree | 92b34dd8ecf8cf5432c25d43292ebc83b7919350 /docs/ref/contrib | |
| parent | 79d0a4fdb0d13ba6a843dace2b90ab44e856bd85 (diff) | |
Fixed #26020 -- Normalized header stylings in docs.
Diffstat (limited to 'docs/ref/contrib')
| -rw-r--r-- | docs/ref/contrib/auth.txt | 1 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/forms-api.txt | 24 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/functions.txt | 52 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/install/geolibs.txt | 12 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/install/index.txt | 32 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/install/spatialite.txt | 14 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/model-api.txt | 4 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/testing.txt | 6 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/tutorial.txt | 4 | ||||
| -rw-r--r-- | docs/ref/contrib/humanize.txt | 16 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/aggregates.txt | 42 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/fields.txt | 51 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/forms.txt | 8 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/functions.txt | 3 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/index.txt | 1 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/operations.txt | 7 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/validators.txt | 4 |
17 files changed, 145 insertions, 136 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt index e4c31731d5..66906d5ddc 100644 --- a/docs/ref/contrib/auth.txt +++ b/docs/ref/contrib/auth.txt @@ -1,3 +1,4 @@ +======================= ``django.contrib.auth`` ======================= diff --git a/docs/ref/contrib/gis/forms-api.txt b/docs/ref/contrib/gis/forms-api.txt index b9c0c1dbe4..c2593acba6 100644 --- a/docs/ref/contrib/gis/forms-api.txt +++ b/docs/ref/contrib/gis/forms-api.txt @@ -18,7 +18,7 @@ In addition to the regular :ref:`form field arguments <core-field-arguments>`, GeoDjango form fields take the following optional arguments. ``srid`` -~~~~~~~~ +-------- .. attribute:: Field.srid @@ -28,7 +28,7 @@ GeoDjango form fields take the following optional arguments. input values into that SRID. ``geom_type`` -~~~~~~~~~~~~~ +------------- .. attribute:: Field.geom_type @@ -40,42 +40,42 @@ Form field classes ================== ``GeometryField`` -~~~~~~~~~~~~~~~~~ +----------------- .. class:: GeometryField ``PointField`` -~~~~~~~~~~~~~~ +-------------- .. class:: PointField ``LineStringField`` -~~~~~~~~~~~~~~~~~~~ +------------------- .. class:: LineStringField ``PolygonField`` -~~~~~~~~~~~~~~~~ +---------------- .. class:: PolygonField ``MultiPointField`` -~~~~~~~~~~~~~~~~~~~ +------------------- .. class:: MultiPointField ``MultiLineStringField`` -~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------ .. class:: MultiLineStringField ``MultiPolygonField`` -~~~~~~~~~~~~~~~~~~~~~ +--------------------- .. class:: MultiPolygonField ``GeometryCollectionField`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------------------------- .. class:: GeometryCollectionField @@ -91,7 +91,7 @@ Note that none of the currently available widgets supports 3D geometries, hence geometry fields will fallback using a simple ``Textarea`` widget for such data. Widget attributes -~~~~~~~~~~~~~~~~~ +----------------- GeoDjango widgets are template-based, so their attributes are mostly different from other Django widget attributes. @@ -134,7 +134,7 @@ widget. For example:: forms.OSMWidget(attrs={'map_width': 800, 'map_height': 500})) Widget classes -~~~~~~~~~~~~~~ +-------------- ``BaseGeometryWidget`` diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index 4ac7a4bc72..282fe55a38 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -36,7 +36,7 @@ Measurement Relationships Operations Editors ================== ======================= ====================== =================== ================== ===================== Area ----- +==== .. class:: Area(expression, **extra) @@ -48,7 +48,7 @@ float value is returned, as it's not possible to automatically determine the unit of the field. AsGeoJSON ---------- +========= .. class:: AsGeoJSON(expression, bbox=False, crs=False, precision=8, **extra) @@ -80,7 +80,7 @@ Keyword Argument Description ===================== ===================================================== AsGML ------ +===== .. class:: AsGML(expression, version=2, precision=8, **extra) @@ -111,7 +111,7 @@ Keyword Argument Description __ https://en.wikipedia.org/wiki/Geography_Markup_Language AsKML ------ +===== .. class:: AsKML(expression, precision=8, **extra) @@ -138,7 +138,7 @@ Keyword Argument Description __ https://developers.google.com/kml/documentation/ AsSVG ------ +===== .. class:: AsSVG(expression, relative=False, precision=8, **extra) @@ -162,7 +162,7 @@ Keyword Argument Description __ http://www.w3.org/Graphics/SVG/ BoundingCircle --------------- +============== .. class:: BoundingCircle(expression, num_seg=48, **extra) @@ -172,7 +172,7 @@ Accepts a single geographic field or expression and returns the smallest circle polygon that can fully contain the geometry. Centroid --------- +======== .. class:: Centroid(expression, **extra) @@ -182,7 +182,7 @@ Accepts a single geographic field or expression and returns the ``centroid`` value of the geometry. Difference ----------- +========== .. class:: Difference(expr1, expr2, **extra) @@ -197,7 +197,7 @@ geometry B. MySQL support was added. Distance --------- +======== .. class:: Distance(expr1, expr2, spheroid=None, **extra) @@ -241,7 +241,7 @@ queryset is calculated:: :ref:`supported_units`. Envelope --------- +======== .. class:: Envelope(expression, **extra) @@ -251,7 +251,7 @@ Accepts a single geographic field or expression and returns the geometry representing the bounding box of the geometry. ForceRHR --------- +======== .. class:: ForceRHR(expression, **extra) @@ -262,7 +262,7 @@ of the polygon/multipolygon in which all of the vertices follow the right-hand rule. GeoHash -------- +======= .. class:: GeoHash(expression, **extra) @@ -278,7 +278,7 @@ representation of the geometry. __ https://en.wikipedia.org/wiki/Geohash Intersection ------------- +============ .. class:: Intersection(expr1, expr2, **extra) @@ -292,7 +292,7 @@ intersection between them. MySQL support was added. Length ------- +====== .. class:: Length(expression, spheroid=True, **extra) @@ -309,7 +309,7 @@ accurate, less resource-intensive) or on a spheroid (more accurate, more resource-intensive) with the ``spheroid`` keyword argument. MemSize -------- +======= .. class:: MemSize(expression, **extra) @@ -319,7 +319,7 @@ Accepts a single geographic field or expression and returns the memory size (number of bytes) that the geometry field takes. NumGeometries -------------- +============= .. class:: NumGeometries(expression, **extra) @@ -330,7 +330,7 @@ geometries if the geometry field is a collection (e.g., a ``GEOMETRYCOLLECTION`` or ``MULTI*`` field); otherwise returns ``None``. NumPoints ---------- +========= .. class:: NumPoints(expression, **extra) @@ -340,7 +340,7 @@ Accepts a single geographic field or expression and returns the number of points in the first linestring in the geometry field; otherwise returns ``None``. Perimeter ---------- +========= .. class:: Perimeter(expression, **extra) @@ -352,7 +352,7 @@ MySQL, a raw float value is returned, as it's not possible to automatically determine the unit of the field. PointOnSurface --------------- +============== .. class:: PointOnSurface(expression, **extra) @@ -362,7 +362,7 @@ Accepts a single geographic field or expression and returns a ``Point`` geometry guaranteed to lie on the surface of the field; otherwise returns ``None``. Reverse -------- +======= .. class:: Reverse(expression, **extra) @@ -372,7 +372,7 @@ Accepts a single geographic field or expression and returns a geometry with reversed coordinates. Scale ------ +===== .. class:: Scale(expression, x, y, z=0.0, **extra) @@ -383,7 +383,7 @@ scaled coordinates by multiplying them with the ``x``, ``y``, and optionally ``z`` parameters. SnapToGrid ----------- +========== .. class:: SnapToGrid(expression, *args, **extra) @@ -403,7 +403,7 @@ Number of Arguments Description =================== ===================================================== SymDifference -------------- +============= .. class:: SymDifference(expr1, expr2, **extra) @@ -418,7 +418,7 @@ parameters. MySQL support was added. Transform ---------- +========= .. class:: Transform(expression, srid, **extra) @@ -435,7 +435,7 @@ the transformed geometry to the spatial reference system specified by the are not necessarily the same as those used by PostGIS. Translate ---------- +========= .. class:: Translate(expression, x, y, z=0.0, **extra) @@ -446,7 +446,7 @@ its coordinates offset by the ``x``, ``y``, and optionally ``z`` numeric parameters. Union ------ +===== .. class:: Union(expr1, expr2, **extra) diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt index 86a85cb05f..617d45f481 100644 --- a/docs/ref/contrib/gis/install/geolibs.txt +++ b/docs/ref/contrib/gis/install/geolibs.txt @@ -120,10 +120,10 @@ script, compile, and install:: $ cd .. Troubleshooting -^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~ Can't find GEOS library -~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^ When GeoDjango can't find GEOS, this error is raised: @@ -139,7 +139,7 @@ If using a binary package of GEOS (e.g., on Ubuntu), you may need to :ref:`binut .. _geoslibrarypath: ``GEOS_LIBRARY_PATH`` -~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^ If your GEOS library is in a non-standard location, or you don't want to modify the system's library path then the :setting:`GEOS_LIBRARY_PATH` @@ -222,10 +222,10 @@ __ https://trac.osgeo.org/gdal/wiki/GdalOgrInPython .. _gdaltrouble: Troubleshooting -^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~ Can't find GDAL library -~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^ When GeoDjango can't find the GDAL library, the ``HAS_GDAL`` flag will be false: @@ -242,7 +242,7 @@ The solution is to properly configure your :ref:`libsettings` *or* set .. _gdallibrarypath: ``GDAL_LIBRARY_PATH`` -~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^ If your GDAL library is in a non-standard location, or you don't want to modify the system's library path then the :setting:`GDAL_LIBRARY_PATH` diff --git a/docs/ref/contrib/gis/install/index.txt b/docs/ref/contrib/gis/install/index.txt index f30a3d74dc..cf49ca7de1 100644 --- a/docs/ref/contrib/gis/install/index.txt +++ b/docs/ref/contrib/gis/install/index.txt @@ -129,7 +129,7 @@ an environment variable, or by configuring the library path for the entire system. ``LD_LIBRARY_PATH`` environment variable -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A user may set this environment variable to customize the library paths they want to use. The typical library directory for software @@ -140,7 +140,7 @@ could place the following in their bash profile:: export LD_LIBRARY_PATH=/usr/local/lib Setting system library path -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~ On GNU/Linux systems, there is typically a file in ``/etc/ld.so.conf``, which may include additional paths from files in another directory, such as ``/etc/ld.so.conf.d``. @@ -160,7 +160,7 @@ modifying the system library path:: .. _binutils: Install ``binutils`` -^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~ GeoDjango uses the ``find_library`` function (from the ``ctypes.util`` Python module) to discover libraries. The ``find_library`` routine uses a program @@ -203,7 +203,7 @@ Foundation, however, this is not required. .. _macosx_python: Python -^^^^^^ +~~~~~~ Although OS X comes with Python installed, users can use `framework installers`__ provided by the Python Software Foundation. An advantage to @@ -223,7 +223,7 @@ __ https://www.python.org/ftp/python/ .. _postgresapp: Postgres.app -^^^^^^^^^^^^ +~~~~~~~~~~~~ `Postgres.app <http://postgresapp.com/>`_ is a standalone PostgreSQL server that includes the PostGIS extension. You will also need to install ``gdal`` and @@ -243,7 +243,7 @@ terminal prompt. .. _homebrew: Homebrew -^^^^^^^^ +~~~~~~~~ `Homebrew`__ provides "recipes" for building binaries and packages from source. It provides recipes for the GeoDjango prerequisites on Macintosh computers @@ -263,7 +263,7 @@ __ http://brew.sh/ .. _kyngchaos: KyngChaos packages -^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~ William Kyngesburye provides a number of `geospatial library binary packages`__ that make it simple to get GeoDjango installed on OS X without compiling @@ -306,7 +306,7 @@ __ http://www.kyngchaos.com/software/postgres .. _psycopg2_kyngchaos: psycopg2 -~~~~~~~~ +^^^^^^^^ After you've installed the KyngChaos binaries and modified your ``PATH``, as described above, ``psycopg2`` may be installed using the following command:: @@ -334,7 +334,7 @@ __ http://pdb.finkproject.org/pdb/browse.php?summary=django-gis .. _macports: MacPorts -^^^^^^^^ +~~~~~~~~ `MacPorts`__ may be used to install GeoDjango prerequisites on Macintosh computers running OS X. Because MacPorts still builds the software from source, @@ -379,7 +379,7 @@ GeoDjango on Windows. GEOS and GDAL, are not yet provided by the :ref:`OSGeo4W` installer. Python -^^^^^^ +~~~~~~ First, download the latest `Python 2.7 installer`__ from the Python website. Next, run the installer and keep the defaults -- for example, keep @@ -395,7 +395,7 @@ Next, run the installer and keep the defaults -- for example, keep __ https://python.org/download/ PostgreSQL -^^^^^^^^^^ +~~~~~~~~~~ First, download the latest `PostgreSQL 9.x installer`__ from the `EnterpriseDB`__ website. After downloading, simply run the installer, @@ -427,7 +427,7 @@ __ http://www.enterprisedb.com .. _postgisasb: PostGIS -^^^^^^^ +~~~~~~~ From within the Application Stack Builder (to run outside of the installer, :menuselection:`Start --> Programs --> PostgreSQL 9.x`), select @@ -446,7 +446,7 @@ default PostGIS database). password in the 'Database Connection Information' dialog. psycopg2 -^^^^^^^^ +~~~~~~~~ The ``psycopg2`` Python module provides the interface between Python and the PostgreSQL database. Download the latest `Windows installer`__ for your version @@ -457,7 +457,7 @@ __ http://www.stickpeople.com/projects/python/win-psycopg/ .. _osgeo4w: OSGeo4W -^^^^^^^ +~~~~~~~ The `OSGeo4W installer`_ makes it simple to install the PROJ.4, GDAL, and GEOS libraries required by GeoDjango. First, download the `OSGeo4W installer`_, @@ -471,7 +471,7 @@ installer. .. _OSGeo4W installer: https://trac.osgeo.org/osgeo4w/ Modify Windows environment -^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to use GeoDjango, you will need to add your Python and OSGeo4W directories to your Windows system ``Path``, as well as create ``GDAL_DATA`` @@ -506,7 +506,7 @@ script, :download:`geodjango_setup.bat`. variables accordingly. Install Django and set up database -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Finally, :ref:`install Django <installing-official-release>` on your system. diff --git a/docs/ref/contrib/gis/install/spatialite.txt b/docs/ref/contrib/gis/install/spatialite.txt index d950472e8a..cf5710c395 100644 --- a/docs/ref/contrib/gis/install/spatialite.txt +++ b/docs/ref/contrib/gis/install/spatialite.txt @@ -20,13 +20,13 @@ __ http://www.gaia-gis.it/gaia-sins/ .. _spatialite_source: Installing from source -~~~~~~~~~~~~~~~~~~~~~~ +====================== :doc:`GEOS and PROJ.4</ref/contrib/gis/install/geolibs>` should be installed prior to building SpatiaLite. SQLite -^^^^^^ +------ Check first if SQLite is compiled with the `R*Tree module`__. Run the sqlite3 command line interface and enter the following query:: @@ -57,7 +57,7 @@ __ https://www.sqlite.org/download.html .. _spatialitebuild: SpatiaLite library (``libspatialite``) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +-------------------------------------- Get the latest SpatiaLite library source bundle from the `download page`__:: @@ -81,13 +81,13 @@ __ http://www.gaia-gis.it/gaia-sins/libspatialite-sources/ .. _spatialite_macosx: Mac OS X-specific instructions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +============================== To install the SpatiaLite library and tools, Mac OS X users can choose between :ref:`kyngchaos` and `Homebrew`_. KyngChaos -^^^^^^^^^ +--------- First, follow the instructions in the :ref:`kyngchaos` section. @@ -109,7 +109,7 @@ add the following to your ``settings.py``:: __ http://www.gaia-gis.it/spatialite-2.3.1/binaries.html Homebrew -^^^^^^^^ +-------- `Homebrew`_ handles all the SpatiaLite related packages on your behalf, including SQLite3, SpatiaLite, PROJ, and GEOS. Install them like this:: @@ -128,7 +128,7 @@ following to your ``settings.py``:: .. _create_spatialite_db: Creating a spatial database for SpatiaLite -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +========================================== When running ``manage.py migrate`` with a SQLite or SpatiaLite database, the database file will be automatically created if it doesn't exist. Django will diff --git a/docs/ref/contrib/gis/model-api.txt b/docs/ref/contrib/gis/model-api.txt index fccbdce35f..d5fe84ebd6 100644 --- a/docs/ref/contrib/gis/model-api.txt +++ b/docs/ref/contrib/gis/model-api.txt @@ -104,7 +104,7 @@ __ https://en.wikipedia.org/wiki/WGS84 .. _selecting-an-srid: Selecting an SRID -^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~ Choosing an appropriate SRID for your model is an important decision that the developer should consider carefully. The SRID is an integer specifier that @@ -213,7 +213,7 @@ details. .. _geography-type: Geography Type -^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~ The geography type provides native support for spatial features represented with geographic coordinates (e.g., WGS84 longitude/latitude). [#fngeography]_ diff --git a/docs/ref/contrib/gis/testing.txt b/docs/ref/contrib/gis/testing.txt index 456f9c32b3..b50f276522 100644 --- a/docs/ref/contrib/gis/testing.txt +++ b/docs/ref/contrib/gis/testing.txt @@ -20,7 +20,7 @@ Settings .. setting:: POSTGIS_VERSION ``POSTGIS_VERSION`` -^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~ When GeoDjango's spatial backend initializes on PostGIS, it has to perform an SQL query to determine the version in order to figure out what @@ -43,7 +43,7 @@ only needs to have the ability to create databases. In other configurations, you may be required to use a database superuser. Create database user -^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~ To make a database user with the ability to create databases, use the following command:: @@ -59,7 +59,7 @@ Alternatively, you may alter an existing user's role from the SQL shell postgres# ALTER ROLE <user_name> CREATEDB NOSUPERUSER NOCREATEROLE; Create database superuser -^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~ This may be done at the time the user is created, for example:: diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt index 89365442c0..9a09c93774 100644 --- a/docs/ref/contrib/gis/tutorial.txt +++ b/docs/ref/contrib/gis/tutorial.txt @@ -695,7 +695,7 @@ GeoDjango extends :doc:`Django's admin application </ref/contrib/admin/index>` with support for 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`_). @@ -742,7 +742,7 @@ position. .. _osmgeoadmin-intro: ``OSMGeoAdmin`` -^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~ With the :class:`~django.contrib.gis.admin.OSMGeoAdmin`, GeoDjango uses a `Open Street Map`_ layer in the admin. diff --git a/docs/ref/contrib/humanize.txt b/docs/ref/contrib/humanize.txt index 8accfe326e..66b15d70f3 100644 --- a/docs/ref/contrib/humanize.txt +++ b/docs/ref/contrib/humanize.txt @@ -16,7 +16,7 @@ filters. .. templatefilter:: apnumber apnumber --------- +======== For numbers 1-9, returns the number spelled out. Otherwise, returns the number. This follows Associated Press style. @@ -32,7 +32,7 @@ You can pass in either an integer or a string representation of an integer. .. templatefilter:: intcomma intcomma --------- +======== Converts an integer to a string containing commas every three digits. @@ -43,7 +43,7 @@ Examples: * ``450000`` becomes ``450,000``. * ``4500000`` becomes ``4,500,000``. -:ref:`Format localization <format-localization>` will be respected if enabled, +:doc:`/topics/i18n/formatting` will be respected if enabled, e.g. with the ``'de'`` language: * ``45000`` becomes ``'45.000'``. @@ -54,7 +54,7 @@ You can pass in either an integer or a string representation of an integer. .. templatefilter:: intword intword -------- +======= Converts a large integer to a friendly text representation. Works best for numbers over 1 million. @@ -67,7 +67,7 @@ Examples: Values up to 10^100 (Googol) are supported. -:ref:`Format localization <format-localization>` will be respected if enabled, +:doc:`/topics/i18n/formatting` will be respected if enabled, e.g. with the ``'de'`` language: * ``1000000`` becomes ``'1,0 Million'``. @@ -79,7 +79,7 @@ You can pass in either an integer or a string representation of an integer. .. templatefilter:: naturalday naturalday ----------- +========== For dates that are the current day or within one day, return "today", "tomorrow" or "yesterday", as appropriate. Otherwise, format the date using @@ -98,7 +98,7 @@ Examples (when 'today' is 17 Feb 2007): .. templatefilter:: naturaltime naturaltime ------------ +=========== For datetime values, returns a string representing how many seconds, minutes or hours ago it was -- falling back to the :tfilter:`timesince` @@ -130,7 +130,7 @@ Examples (when 'now' is 17 Feb 2007 16:30:00): .. templatefilter:: ordinal ordinal -------- +======= Converts an integer to its ordinal as a string. diff --git a/docs/ref/contrib/postgres/aggregates.txt b/docs/ref/contrib/postgres/aggregates.txt index d4c5f028f6..f9d222c930 100644 --- a/docs/ref/contrib/postgres/aggregates.txt +++ b/docs/ref/contrib/postgres/aggregates.txt @@ -19,17 +19,17 @@ These functions are described in more detail in the `PostgreSQL docs {'arr': [0, 1, 2]} General-purpose aggregation functions -------------------------------------- +===================================== ArrayAgg -~~~~~~~~ +-------- .. class:: ArrayAgg(expression, **extra) Returns a list of values, including nulls, concatenated into an array. BitAnd -~~~~~~ +------ .. class:: BitAnd(expression, **extra) @@ -37,7 +37,7 @@ BitAnd ``None`` if all values are null. BitOr -~~~~~ +----- .. class:: BitOr(expression, **extra) @@ -45,7 +45,7 @@ BitOr ``None`` if all values are null. BoolAnd -~~~~~~~~ +------- .. class:: BoolAnd(expression, **extra) @@ -53,7 +53,7 @@ BoolAnd null or if there are no values, otherwise ``False`` . BoolOr -~~~~~~ +------ .. class:: BoolOr(expression, **extra) @@ -61,7 +61,7 @@ BoolOr values are null or if there are no values, otherwise ``False``. StringAgg -~~~~~~~~~ +--------- .. class:: StringAgg(expression, delimiter) @@ -73,16 +73,16 @@ StringAgg Required argument. Needs to be a string. Aggregate functions for statistics ----------------------------------- +================================== ``y`` and ``x`` -~~~~~~~~~~~~~~~ +--------------- The arguments ``y`` and ``x`` for all these functions can be the name of a field or an expression returning a numeric data. Both are required. Corr -~~~~ +---- .. class:: Corr(y, x) @@ -90,7 +90,7 @@ Corr aren't any matching rows. CovarPop -~~~~~~~~ +-------- .. class:: CovarPop(y, x, sample=False) @@ -106,7 +106,7 @@ CovarPop population covariance. RegrAvgX -~~~~~~~~ +-------- .. class:: RegrAvgX(y, x) @@ -114,7 +114,7 @@ RegrAvgX ``float``, or ``None`` if there aren't any matching rows. RegrAvgY -~~~~~~~~ +-------- .. class:: RegrAvgY(y, x) @@ -122,7 +122,7 @@ RegrAvgY ``float``, or ``None`` if there aren't any matching rows. RegrCount -~~~~~~~~~ +--------- .. class:: RegrCount(y, x) @@ -130,7 +130,7 @@ RegrCount are not null. RegrIntercept -~~~~~~~~~~~~~ +------------- .. class:: RegrIntercept(y, x) @@ -139,7 +139,7 @@ RegrIntercept matching rows. RegrR2 -~~~~~~ +------ .. class:: RegrR2(y, x) @@ -147,7 +147,7 @@ RegrR2 ``None`` if there aren't any matching rows. RegrSlope -~~~~~~~~~ +--------- .. class:: RegrSlope(y, x) @@ -156,7 +156,7 @@ RegrSlope matching rows. RegrSXX -~~~~~~~ +------- .. class:: RegrSXX(y, x) @@ -164,7 +164,7 @@ RegrSXX variable) as a ``float``, or ``None`` if there aren't any matching rows. RegrSXY -~~~~~~~ +------- .. class:: RegrSXY(y, x) @@ -173,7 +173,7 @@ RegrSXY matching rows. RegrSYY -~~~~~~~ +------- .. class:: RegrSYY(y, x) @@ -181,7 +181,7 @@ RegrSYY variable) as a ``float``, or ``None`` if there aren't any matching rows. Usage examples --------------- +============== We will use this example table:: diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index cb6f15acc5..af41666aa7 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -1,3 +1,4 @@ +================================ PostgreSQL specific model fields ================================ @@ -7,7 +8,7 @@ module. .. currentmodule:: django.contrib.postgres.fields ArrayField ----------- +========== .. class:: ArrayField(base_field, size=None, **options) @@ -91,7 +92,7 @@ ArrayField nullable and the values padded with ``None``. Querying ArrayField -^^^^^^^^^^^^^^^^^^^ +------------------- There are a number of custom lookups and transforms for :class:`ArrayField`. We will use the following example model:: @@ -242,7 +243,7 @@ lookups available after the transform do not change. For example:: fashion by Django. Indexing ArrayField -^^^^^^^^^^^^^^^^^^^ +------------------- At present using :attr:`~django.db.models.Field.db_index` will create a ``btree`` index. This does not offer particularly significant help to querying. @@ -250,7 +251,7 @@ A more useful index is a ``GIN`` index, which you should create using a :class:`~django.db.migrations.operations.RunSQL` operation. HStoreField ------------ +=========== .. class:: HStoreField(**options) @@ -292,7 +293,7 @@ HStoreField :class:`~django.contrib.postgres.validators.KeysValidator`. Querying HStoreField -^^^^^^^^^^^^^^^^^^^^ +-------------------- In addition to the ability to query by key, there are a number of custom lookups available for ``HStoreField``. @@ -457,7 +458,7 @@ using in conjunction with lookups on <QuerySet [<Dog: Meg>]> JSONField ---------- +========= .. versionadded:: 1.9 @@ -492,7 +493,7 @@ JSONField **As a result, this field requires PostgreSQL ≥ 9.4 and Psycopg2 ≥ 2.5.4**. Querying JSONField -^^^^^^^^^^^^^^^^^^ +------------------ We will use the following example model:: @@ -575,7 +576,7 @@ containment and keys with :class:`~django.contrib.postgres.fields.HStoreField`. .. _range-fields: Range Fields ------------- +============ There are five range field types, corresponding to the built-in range types in PostgreSQL. These fields are used to store a range of values; for example the @@ -588,7 +589,7 @@ information is necessary. The default is lower bound included, upper bound excluded. IntegerRangeField -^^^^^^^^^^^^^^^^^ +----------------- .. class:: IntegerRangeField(**options) @@ -598,7 +599,7 @@ IntegerRangeField Python. BigIntegerRangeField -^^^^^^^^^^^^^^^^^^^^ +-------------------- .. class:: BigIntegerRangeField(**options) @@ -608,7 +609,7 @@ BigIntegerRangeField Python. FloatRangeField -^^^^^^^^^^^^^^^ +--------------- .. class:: FloatRangeField(**options) @@ -617,7 +618,7 @@ FloatRangeField database and a :class:`~psycopg2:psycopg2.extras.NumericRange` in Python. DateTimeRangeField -^^^^^^^^^^^^^^^^^^ +------------------ .. class:: DateTimeRangeField(**options) @@ -627,7 +628,7 @@ DateTimeRangeField Python. DateRangeField -^^^^^^^^^^^^^^ +-------------- .. class:: DateRangeField(**options) @@ -636,7 +637,7 @@ DateRangeField database and a :class:`~psycopg2:psycopg2.extras.DateRange` in Python. Querying Range Fields -^^^^^^^^^^^^^^^^^^^^^ +--------------------- There are a number of custom lookups and transforms for range fields. They are available on all the above fields, but we will use the following example @@ -675,7 +676,7 @@ operators ``@>``, ``<@``, and ``&&`` respectively. .. fieldlookup:: rangefield.contains contains -'''''''' +^^^^^^^^ >>> Event.objects.filter(ages__contains=NumericRange(4, 5)) <QuerySet [<Event: Soft play>]> @@ -683,7 +684,7 @@ contains .. fieldlookup:: rangefield.contained_by contained_by -'''''''''''' +^^^^^^^^^^^^ >>> Event.objects.filter(ages__contained_by=NumericRange(0, 15)) <QuerySet [<Event: Soft play>]> @@ -707,7 +708,7 @@ contained_by .. fieldlookup:: rangefield.overlap overlap -''''''' +^^^^^^^ >>> Event.objects.filter(ages__overlap=NumericRange(8, 12)) <QuerySet [<Event: Soft play>]> @@ -724,7 +725,7 @@ the specific range comparison operators. .. fieldlookup:: rangefield.fully_lt fully_lt -'''''''' +^^^^^^^^ The returned ranges are strictly less than the passed range. In other words, all the points in the returned range are less than all those in the passed @@ -736,7 +737,7 @@ range. .. fieldlookup:: rangefield.fully_gt fully_gt -'''''''' +^^^^^^^^ The returned ranges are strictly greater than the passed range. In other words, the all the points in the returned range are greater than all those in the @@ -748,7 +749,7 @@ passed range. .. fieldlookup:: rangefield.not_lt not_lt -'''''' +^^^^^^ The returned ranges do not contain any points less than the passed range, that is the lower bound of the returned range is at least the lower bound of the @@ -760,7 +761,7 @@ passed range. .. fieldlookup:: rangefield.not_gt not_gt -'''''' +^^^^^^ The returned ranges do not contain any points greater than the passed range, that is the upper bound of the returned range is at most the upper bound of the @@ -772,7 +773,7 @@ passed range. .. fieldlookup:: rangefield.adjacent_to adjacent_to -''''''''''' +^^^^^^^^^^^ The returned ranges share a bound with the passed range. @@ -788,7 +789,7 @@ lower or upper bound, or query based on emptiness. .. fieldlookup:: rangefield.startswith startswith -'''''''''' +^^^^^^^^^^ Returned objects have the given lower bound. Can be chained to valid lookups for the base field. @@ -799,7 +800,7 @@ for the base field. .. fieldlookup:: rangefield.endswith endswith -'''''''' +^^^^^^^^ Returned objects have the given upper bound. Can be chained to valid lookups for the base field. @@ -810,7 +811,7 @@ for the base field. .. fieldlookup:: rangefield.isempty isempty -''''''' +^^^^^^^ Returned objects are empty ranges. Can be chained to valid lookups for a :class:`~django.db.models.BooleanField`. diff --git a/docs/ref/contrib/postgres/forms.txt b/docs/ref/contrib/postgres/forms.txt index 431cf9c802..288c826f93 100644 --- a/docs/ref/contrib/postgres/forms.txt +++ b/docs/ref/contrib/postgres/forms.txt @@ -1,3 +1,4 @@ +=========================================== PostgreSQL specific form fields and widgets =========================================== @@ -6,6 +7,9 @@ All of these fields and widgets are available from the .. currentmodule:: django.contrib.postgres.forms +Fields +====== + SimpleArrayField ---------------- @@ -217,10 +221,10 @@ DateRangeField :class:`~django.contrib.postgres.fields.DateRangeField`. Widgets -------- +======= RangeWidget -~~~~~~~~~~~ +----------- .. class:: RangeWidget(base_widget, attrs=None) diff --git a/docs/ref/contrib/postgres/functions.txt b/docs/ref/contrib/postgres/functions.txt index f4abdc2c17..25dac99e4d 100644 --- a/docs/ref/contrib/postgres/functions.txt +++ b/docs/ref/contrib/postgres/functions.txt @@ -1,3 +1,4 @@ +====================================== PostgreSQL specific database functions ====================================== @@ -7,7 +8,7 @@ All of these functions are available from the .. currentmodule:: django.contrib.postgres.functions TransactionNow --------------- +============== .. class:: TransactionNow() diff --git a/docs/ref/contrib/postgres/index.txt b/docs/ref/contrib/postgres/index.txt index 29847c3f99..fe5b3be2ab 100644 --- a/docs/ref/contrib/postgres/index.txt +++ b/docs/ref/contrib/postgres/index.txt @@ -1,3 +1,4 @@ +=========================== ``django.contrib.postgres`` =========================== diff --git a/docs/ref/contrib/postgres/operations.txt b/docs/ref/contrib/postgres/operations.txt index 79c2021c39..81ecb6acb2 100644 --- a/docs/ref/contrib/postgres/operations.txt +++ b/docs/ref/contrib/postgres/operations.txt @@ -1,3 +1,4 @@ +============================= Database migration operations ============================= @@ -7,7 +8,7 @@ the ``django.contrib.postgres.operations`` module. .. currentmodule:: django.contrib.postgres.operations CreateExtension ---------------- +=============== .. class:: CreateExtension(name) @@ -18,7 +19,7 @@ CreateExtension This is a required argument. The name of the extension to be installed. HStoreExtension ---------------- +=============== .. class:: HStoreExtension() @@ -27,7 +28,7 @@ HStoreExtension connection to interpret hstore data. UnaccentExtension ------------------ +================= .. class:: UnaccentExtension() diff --git a/docs/ref/contrib/postgres/validators.txt b/docs/ref/contrib/postgres/validators.txt index f35a40dd27..21a1935f55 100644 --- a/docs/ref/contrib/postgres/validators.txt +++ b/docs/ref/contrib/postgres/validators.txt @@ -5,7 +5,7 @@ Validators .. module:: django.contrib.postgres.validators ``KeysValidator`` ------------------ +================= .. class:: KeysValidator(keys, strict=False, messages=None) @@ -20,7 +20,7 @@ Validators the value of a key is non-empty. Range validators ----------------- +================ .. class:: RangeMaxValueValidator(limit_value, message=None) |
