From bca9faae95db2a92e540fbd08505c134639916fe Mon Sep 17 00:00:00 2001 From: "Elif T. Kus" Date: Sun, 3 Jan 2016 12:56:22 +0200 Subject: Fixed #26020 -- Normalized header stylings in docs. --- docs/ref/contrib/postgres/aggregates.txt | 42 +++++++++++++------------- docs/ref/contrib/postgres/fields.txt | 51 ++++++++++++++++---------------- docs/ref/contrib/postgres/forms.txt | 8 +++-- docs/ref/contrib/postgres/functions.txt | 3 +- docs/ref/contrib/postgres/index.txt | 1 + docs/ref/contrib/postgres/operations.txt | 7 +++-- docs/ref/contrib/postgres/validators.txt | 4 +-- 7 files changed, 62 insertions(+), 54 deletions(-) (limited to 'docs/ref/contrib/postgres') 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) -- cgit v1.3