WeekArchiveView
----------------
+===============
.. class:: WeekArchiveView
@@ -392,7 +392,7 @@ WeekArchiveView
filter ``'%U'`` outputs the number of seconds since the Unix epoch.
DayArchiveView
---------------
+==============
.. class:: DayArchiveView
@@ -494,7 +494,7 @@ DayArchiveView
TodayArchiveView
-----------------
+================
.. class:: TodayArchiveView
@@ -551,7 +551,7 @@ TodayArchiveView
name of the new template.
DateDetailView
---------------
+==============
.. class:: DateDetailView
diff --git a/docs/ref/class-based-views/generic-display.txt b/docs/ref/class-based-views/generic-display.txt
index 5dc0391319..8f45ce654b 100644
--- a/docs/ref/class-based-views/generic-display.txt
+++ b/docs/ref/class-based-views/generic-display.txt
@@ -6,7 +6,7 @@ The two following generic class-based views are designed to display data. On
many projects they are typically the most commonly used views.
DetailView
-----------
+==========
.. class:: django.views.generic.detail.DetailView
@@ -73,7 +73,7 @@ DetailView
Date: {{ now|date }}
ListView
---------
+========
.. class:: django.views.generic.list.ListView
diff --git a/docs/ref/class-based-views/generic-editing.txt b/docs/ref/class-based-views/generic-editing.txt
index d726c0a3cb..c59870c4f0 100644
--- a/docs/ref/class-based-views/generic-editing.txt
+++ b/docs/ref/class-based-views/generic-editing.txt
@@ -25,7 +25,7 @@ editing content:
return reverse('author-detail', kwargs={'pk': self.pk})
FormView
---------
+========
.. class:: django.views.generic.edit.FormView
@@ -81,7 +81,7 @@ FormView
CreateView
-----------
+==========
.. class:: django.views.generic.edit.CreateView
@@ -136,7 +136,7 @@ CreateView
UpdateView
-----------
+==========
.. class:: django.views.generic.edit.UpdateView
@@ -193,7 +193,7 @@ UpdateView
DeleteView
-----------
+==========
.. class:: django.views.generic.edit.DeleteView
diff --git a/docs/ref/class-based-views/index.txt b/docs/ref/class-based-views/index.txt
index b5ba62dbc3..5670849562 100644
--- a/docs/ref/class-based-views/index.txt
+++ b/docs/ref/class-based-views/index.txt
@@ -16,7 +16,7 @@ Class-based views API reference. For introductory material, see the
flattened-index
Specification
--------------
+=============
Each request served by a class-based view has an independent state; therefore,
it is safe to store state variables on the instance (i.e., ``self.foo = 3`` is
@@ -44,7 +44,7 @@ previous example, this means that every request on ``MyView`` is able to use
the class (return ``True`` on a ``hasattr`` check).
Base vs Generic views
----------------------
+=====================
Base class-based views can be thought of as *parent* views, which can be
used by themselves or inherited from. They may not provide all the
diff --git a/docs/ref/class-based-views/mixins-date-based.txt b/docs/ref/class-based-views/mixins-date-based.txt
index 020fc918b8..921d3dee0d 100644
--- a/docs/ref/class-based-views/mixins-date-based.txt
+++ b/docs/ref/class-based-views/mixins-date-based.txt
@@ -11,7 +11,7 @@ Date-based mixins
characters from the :ttag:`now` template tag as they are not compatible.
YearMixin
----------
+=========
.. class:: YearMixin
@@ -63,7 +63,7 @@ YearMixin
:attr:`~DateMixin.allow_future`.
MonthMixin
-----------
+==========
.. class:: MonthMixin
@@ -115,7 +115,7 @@ MonthMixin
:attr:`~DateMixin.allow_future`.
DayMixin
---------
+========
.. class:: DayMixin
@@ -167,7 +167,7 @@ DayMixin
:attr:`~DateMixin.allow_future`.
WeekMixin
----------
+=========
.. class:: WeekMixin
@@ -220,7 +220,7 @@ WeekMixin
:attr:`~DateMixin.allow_future`.
DateMixin
----------
+=========
.. class:: DateMixin
@@ -266,7 +266,7 @@ DateMixin
:attr:`~DateMixin.allow_future` by default.
BaseDateListView
-----------------
+================
.. class:: BaseDateListView
diff --git a/docs/ref/class-based-views/mixins-editing.txt b/docs/ref/class-based-views/mixins-editing.txt
index 29e1f05a8e..2676cbf0bc 100644
--- a/docs/ref/class-based-views/mixins-editing.txt
+++ b/docs/ref/class-based-views/mixins-editing.txt
@@ -15,7 +15,7 @@ The following mixins are used to construct Django's editing views:
the documentation on :doc:`/ref/class-based-views/generic-editing`.
FormMixin
----------
+=========
.. class:: django.views.generic.edit.FormMixin
@@ -95,7 +95,7 @@ FormMixin
name 'form'.
ModelFormMixin
---------------
+==============
.. class:: django.views.generic.edit.ModelFormMixin
@@ -181,7 +181,7 @@ ModelFormMixin
ProcessFormView
----------------
+===============
.. class:: django.views.generic.edit.ProcessFormView
@@ -221,7 +221,7 @@ ProcessFormView
DeletionMixin
--------------
+=============
.. class:: django.views.generic.edit.DeletionMixin
diff --git a/docs/ref/class-based-views/mixins-multiple-object.txt b/docs/ref/class-based-views/mixins-multiple-object.txt
index 6c4cdadedf..8b30d91f23 100644
--- a/docs/ref/class-based-views/mixins-multiple-object.txt
+++ b/docs/ref/class-based-views/mixins-multiple-object.txt
@@ -3,7 +3,7 @@ Multiple object mixins
======================
MultipleObjectMixin
--------------------
+===================
.. class:: django.views.generic.list.MultipleObjectMixin
@@ -193,7 +193,7 @@ MultipleObjectMixin
MultipleObjectTemplateResponseMixin
------------------------------------
+===================================
.. class:: django.views.generic.list.MultipleObjectTemplateResponseMixin
diff --git a/docs/ref/class-based-views/mixins-simple.txt b/docs/ref/class-based-views/mixins-simple.txt
index 9550c22ed4..e6fd4ac3f4 100644
--- a/docs/ref/class-based-views/mixins-simple.txt
+++ b/docs/ref/class-based-views/mixins-simple.txt
@@ -3,7 +3,7 @@ Simple mixins
=============
ContextMixin
-------------
+============
.. class:: django.views.generic.base.ContextMixin
@@ -32,7 +32,7 @@ ContextMixin
`.
TemplateResponseMixin
----------------------
+=====================
.. class:: django.views.generic.base.TemplateResponseMixin
diff --git a/docs/ref/class-based-views/mixins-single-object.txt b/docs/ref/class-based-views/mixins-single-object.txt
index 02c1437526..d04f5dc5a1 100644
--- a/docs/ref/class-based-views/mixins-single-object.txt
+++ b/docs/ref/class-based-views/mixins-single-object.txt
@@ -3,7 +3,7 @@ Single object mixins
====================
SingleObjectMixin
------------------
+=================
.. class:: django.views.generic.detail.SingleObjectMixin
@@ -132,7 +132,7 @@ SingleObjectMixin
SingleObjectTemplateResponseMixin
----------------------------------
+=================================
.. class:: django.views.generic.detail.SingleObjectTemplateResponseMixin
diff --git a/docs/ref/clickjacking.txt b/docs/ref/clickjacking.txt
index ed51b5ea8f..5f8f5a21d4 100644
--- a/docs/ref/clickjacking.txt
+++ b/docs/ref/clickjacking.txt
@@ -52,7 +52,7 @@ How to use it
=============
Setting X-Frame-Options for all responses
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-----------------------------------------
To set the same ``X-Frame-Options`` value for all responses in your site, put
``'django.middleware.clickjacking.XFrameOptionsMiddleware'`` to
@@ -86,7 +86,7 @@ that tells the middleware not to set the header::
Setting X-Frame-Options per view
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------------
To set the ``X-Frame-Options`` header on a per view basis, Django provides these
decorators::
@@ -114,7 +114,7 @@ modern browser. Older browsers will quietly ignore the header and need `other
clickjacking prevention techniques`_.
Browsers that support X-Frame-Options
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-------------------------------------
* Internet Explorer 8+
* Firefox 3.6.9+
@@ -123,7 +123,7 @@ Browsers that support X-Frame-Options
* Chrome 4.1+
See also
-~~~~~~~~
+--------
A `complete list`_ of browsers supporting ``X-Frame-Options``.
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 `,
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 `_ 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 ` 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` 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 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 `
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 ` 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 ` 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
]>
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))
]>
@@ -683,7 +684,7 @@ contains
.. fieldlookup:: rangefield.contained_by
contained_by
-''''''''''''
+^^^^^^^^^^^^
>>> Event.objects.filter(ages__contained_by=NumericRange(0, 15))
]>
@@ -707,7 +708,7 @@ contained_by
.. fieldlookup:: rangefield.overlap
overlap
-'''''''
+^^^^^^^
>>> Event.objects.filter(ages__overlap=NumericRange(8, 12))
]>
@@ -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)
diff --git a/docs/ref/files/file.txt b/docs/ref/files/file.txt
index d6824af18c..6c9b93f1d6 100644
--- a/docs/ref/files/file.txt
+++ b/docs/ref/files/file.txt
@@ -1,3 +1,4 @@
+===================
The ``File`` object
===================
@@ -7,7 +8,7 @@ for basic file handling in Django.
.. currentmodule:: django.core.files
The ``File`` Class
-------------------
+==================
.. class:: File(file_object)
@@ -90,7 +91,7 @@ The ``File`` Class
.. currentmodule:: django.core.files.base
The ``ContentFile`` Class
--------------------------
+=========================
.. class:: ContentFile(File)
@@ -107,7 +108,7 @@ The ``ContentFile`` Class
.. currentmodule:: django.core.files.images
The ``ImageFile`` Class
------------------------
+=======================
.. class:: ImageFile(file_object)
@@ -127,7 +128,7 @@ The ``ImageFile`` Class
.. currentmodule:: django.core.files
Additional methods on files attached to objects
------------------------------------------------
+===============================================
Any :class:`File` that is associated with an object (as with ``Car.photo``,
below) will also have a couple of extra methods:
diff --git a/docs/ref/files/storage.txt b/docs/ref/files/storage.txt
index be9c554341..6bbb197c0c 100644
--- a/docs/ref/files/storage.txt
+++ b/docs/ref/files/storage.txt
@@ -1,10 +1,11 @@
+================
File storage API
================
.. module:: django.core.files.storage
Getting the current storage class
----------------------------------
+=================================
Django provides two convenient ways to access the current storage class:
@@ -27,7 +28,7 @@ Django provides two convenient ways to access the current storage class:
raised if the import is unsuccessful.
The FileSystemStorage Class
----------------------------
+===========================
.. class:: FileSystemStorage(location=None, base_url=None, file_permissions_mode=None, directory_permissions_mode=None)
@@ -62,7 +63,7 @@ The FileSystemStorage Class
an exception if the given file name does not exist.
The Storage Class
------------------
+=================
.. class:: Storage
diff --git a/docs/ref/files/uploads.txt b/docs/ref/files/uploads.txt
index 028e7a6875..9bc508781f 100644
--- a/docs/ref/files/uploads.txt
+++ b/docs/ref/files/uploads.txt
@@ -137,7 +137,7 @@ All file upload handlers should be subclasses of
handlers wherever you wish.
Required methods
-~~~~~~~~~~~~~~~~
+----------------
Custom file upload handlers **must** define the following methods:
@@ -171,7 +171,7 @@ Custom file upload handlers **must** define the following methods:
the ``UploadedFile`` object should come from subsequent upload handlers.
Optional methods
-~~~~~~~~~~~~~~~~
+----------------
Custom upload handlers may also define any of the following optional methods or
attributes:
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt
index c36f19ca2b..631fe1ea54 100644
--- a/docs/ref/forms/api.txt
+++ b/docs/ref/forms/api.txt
@@ -13,7 +13,7 @@ The Forms API
.. _ref-forms-api-bound-unbound:
Bound and unbound forms
------------------------
+=======================
A :class:`Form` instance is either **bound** to a set of data, or **unbound**.
@@ -69,7 +69,7 @@ another :class:`Form` instance. There is no way to change data in a
should consider its data immutable, whether it has data or not.
Using forms to validate data
-----------------------------
+============================
.. method:: Form.clean()
@@ -201,7 +201,7 @@ This includes ``ValidationError``\s that are raised in :meth:`Form.clean()
"...") `.
Behavior of unbound forms
-~~~~~~~~~~~~~~~~~~~~~~~~~
+-------------------------
It's meaningless to validate a form with no data, but, for the record, here's
what happens with unbound forms::
@@ -213,7 +213,7 @@ what happens with unbound forms::
{}
Dynamic initial values
-----------------------
+======================
.. attribute:: Form.initial
@@ -249,7 +249,7 @@ precedence::
Comment:
Checking which form data has changed
-------------------------------------
+====================================
.. method:: Form.has_changed()
@@ -286,7 +286,7 @@ provided in :attr:`~Form.initial`. It returns an empty list if no data differs.
... print("The following fields changed: %s" % ", ".join(f.changed_data))
Accessing the fields from the form
-----------------------------------
+==================================
.. attribute:: Form.fields
@@ -320,7 +320,7 @@ process::
'
Username:
'
Accessing "clean" data
-----------------------
+======================
.. attribute:: Form.cleaned_data
@@ -414,7 +414,7 @@ fields). More information about this is in :doc:`/ref/forms/validation`.
.. _ref-forms-api-outputting-html:
Outputting forms as HTML
-------------------------
+========================
The second task of a ``Form`` object is to render itself as HTML. To do so,
simply ``print`` it::
@@ -476,7 +476,7 @@ form, other output styles are available. Each style is available as a method on
a form object, and each rendering method returns a Unicode object.
``as_p()``
-~~~~~~~~~~
+----------
.. method:: Form.as_p()
@@ -493,7 +493,7 @@ containing one field::
``as_table()``
-~~~~~~~~~~~~~~
+--------------
.. method:: Form.as_table()
@@ -532,7 +532,7 @@ it calls its ``as_table()`` method behind the scenes::
.. _ref-forms-api-styling-form-rows:
Styling required or erroneous form rows
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---------------------------------------
.. attribute:: Form.error_css_class
.. attribute:: Form.required_css_class
@@ -571,7 +571,7 @@ classes, as needed. The HTML will look something like::
.. _ref-forms-api-configuring-label:
Configuring form elements' HTML ``id`` attributes and ``