Permalink
Browse files

Fixed #15233 -- reST/Sphinx markup corrections in numerous areas, mos…

…tly centering around bad crossref targets. Thanks to Aryeh Leib Taurog for the draft patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent a40685f commit 319de16ff0687072eefe5487b088af9e7ba11fd0 Gabriel Hurley committed Feb 16, 2011
@@ -1110,6 +1110,8 @@ information.
============================
.. class:: InlineModelAdmin
+.. class:: TabularInline
+.. class:: StackedInline
The admin interface has the ability to edit models on the same page as a
parent model. These are called inlines. Suppose you have these two models::
@@ -1134,8 +1136,8 @@ information.
Django provides two subclasses of ``InlineModelAdmin`` and they are:
- * ``TabularInline``
- * ``StackedInline``
+ * :class:`~django.contrib.admin.TabularInline`
+ * :class:`~django.contrib.admin.StackedInline`
The difference between these two is merely the template used to render
them.
@@ -2,7 +2,7 @@
Form preview
============
-.. module:: django.contrib.formtools
+.. module:: django.contrib.formtools.preview
:synopsis: Displays an HTML form, forces a preview, then does something
with the submission.
@@ -26,7 +26,7 @@ application takes care of the following workflow:
b. If it's not valid, redisplays the form with error messages.
3. When the "confirmation" form is submitted from the preview page, calls
a hook that you define -- a
- :meth:`~django.contrib.formtools.FormPreview.done()` method that gets
+ :meth:`~django.contrib.formtools.preview.FormPreview.done()` method that gets
passed the valid data.
The framework enforces the required preview by passing a shared-secret hash to
@@ -50,8 +50,8 @@ How to use ``FormPreview``
:file:`django/contrib/formtools/templates` directory, and add that
directory to your :setting:`TEMPLATE_DIRS` setting.
- 2. Create a :class:`~django.contrib.formtools.FormPreview` subclass that
- overrides the :meth:`~django.contrib.formtools.FormPreview.done()`
+ 2. Create a :class:`~django.contrib.formtools.preview.FormPreview` subclass that
+ overrides the :meth:`~django.contrib.formtools.preview.FormPreview.done()`
method::
from django.contrib.formtools.preview import FormPreview
@@ -70,7 +70,7 @@ How to use ``FormPreview``
is the end result of the form being submitted.
3. Change your URLconf to point to an instance of your
- :class:`~django.contrib.formtools.FormPreview` subclass::
+ :class:`~django.contrib.formtools.preview.FormPreview` subclass::
from myapp.preview import SomeModelFormPreview
from myapp.forms import SomeModelForm
@@ -89,11 +89,11 @@ How to use ``FormPreview``
.. class:: FormPreview
-A :class:`~django.contrib.formtools.FormPreview` class is a simple Python class
+A :class:`~django.contrib.formtools.preview.FormPreview` class is a simple Python class
that represents the preview workflow.
-:class:`~django.contrib.formtools.FormPreview` classes must subclass
+:class:`~django.contrib.formtools.preview.FormPreview` classes must subclass
``django.contrib.formtools.preview.FormPreview`` and override the
-:meth:`~django.contrib.formtools.FormPreview.done()` method. They can live
+:meth:`~django.contrib.formtools.preview.FormPreview.done()` method. They can live
anywhere in your codebase.
``FormPreview`` templates
@@ -102,8 +102,8 @@ anywhere in your codebase.
By default, the form is rendered via the template :file:`formtools/form.html`,
and the preview page is rendered via the template :file:`formtools/preview.html`.
These values can be overridden for a particular form preview by setting
-:attr:`~django.contrib.formtools.FormPreview.preview_template` and
-:attr:`~django.contrib.formtools.FormPreview.form_template` attributes on the
+:attr:`~django.contrib.formtools.preview.FormPreview.preview_template` and
+:attr:`~django.contrib.formtools.preview.FormPreview.form_template` attributes on the
FormPreview subclass. See :file:`django/contrib/formtools/templates` for the
default templates.
@@ -160,6 +160,8 @@ commonly used groups of widgets:
Takes two optional arguments, ``date_format`` and ``time_format``, which
work just like the ``format`` argument for ``DateInput`` and ``TimeInput``.
+.. currentmodule:: django.forms.extras.widgets
+
.. class:: SelectDateWidget
Wrapper around three select widgets: one each for month, day, and year.
@@ -180,6 +182,7 @@ commonly used groups of widgets:
Specifying widgets
------------------
+.. currentmodule:: django.forms
.. attribute:: Form.widget
@@ -1749,6 +1749,8 @@ SQL equivalents::
Aggregation functions
---------------------
+.. currentmodule:: django.db.models
+
Django provides the following aggregation functions in the
``django.db.models`` module. For details on how to use these
aggregate functions, see
@@ -1759,100 +1761,100 @@ Avg
.. class:: Avg(field)
-Returns the mean value of the given field.
+ Returns the mean value of the given field.
- * Default alias: ``<field>__avg``
- * Return type: float
+ * Default alias: ``<field>__avg``
+ * Return type: float
Count
~~~~~
.. class:: Count(field, distinct=False)
-Returns the number of objects that are related through the provided field.
+ Returns the number of objects that are related through the provided field.
- * Default alias: ``<field>__count``
- * Return type: integer
+ * Default alias: ``<field>__count``
+ * Return type: integer
-Has one optional argument:
+ Has one optional argument:
-.. attribute:: distinct
+ .. attribute:: distinct
- If distinct=True, the count will only include unique instances. This has
- the SQL equivalent of ``COUNT(DISTINCT field)``. Default value is ``False``.
+ If distinct=True, the count will only include unique instances. This has
+ the SQL equivalent of ``COUNT(DISTINCT field)``. Default value is ``False``.
Max
~~~
.. class:: Max(field)
-Returns the maximum value of the given field.
+ Returns the maximum value of the given field.
- * Default alias: ``<field>__max``
- * Return type: same as input field
+ * Default alias: ``<field>__max``
+ * Return type: same as input field
Min
~~~
.. class:: Min(field)
-Returns the minimum value of the given field.
+ Returns the minimum value of the given field.
- * Default alias: ``<field>__min``
- * Return type: same as input field
+ * Default alias: ``<field>__min``
+ * Return type: same as input field
StdDev
~~~~~~
.. class:: StdDev(field, sample=False)
-Returns the standard deviation of the data in the provided field.
+ Returns the standard deviation of the data in the provided field.
- * Default alias: ``<field>__stddev``
- * Return type: float
+ * Default alias: ``<field>__stddev``
+ * Return type: float
-Has one optional argument:
+ Has one optional argument:
-.. attribute:: sample
+ .. attribute:: sample
- By default, ``StdDev`` returns the population standard deviation. However,
- if ``sample=True``, the return value will be the sample standard deviation.
+ By default, ``StdDev`` returns the population standard deviation. However,
+ if ``sample=True``, the return value will be the sample standard deviation.
-.. admonition:: SQLite
+ .. admonition:: SQLite
- SQLite doesn't provide ``StdDev`` out of the box. An implementation is
- available as an extension module for SQLite. Consult the SQlite
- documentation for instructions on obtaining and installing this extension.
+ SQLite doesn't provide ``StdDev`` out of the box. An implementation is
+ available as an extension module for SQLite. Consult the SQlite
+ documentation for instructions on obtaining and installing this extension.
Sum
~~~
.. class:: Sum(field)
-Computes the sum of all values of the given field.
+ Computes the sum of all values of the given field.
- * Default alias: ``<field>__sum``
- * Return type: same as input field
+ * Default alias: ``<field>__sum``
+ * Return type: same as input field
Variance
~~~~~~~~
.. class:: Variance(field, sample=False)
-Returns the variance of the data in the provided field.
+ Returns the variance of the data in the provided field.
- * Default alias: ``<field>__variance``
- * Return type: float
+ * Default alias: ``<field>__variance``
+ * Return type: float
-Has one optional argument:
+ Has one optional argument:
-.. attribute:: sample
+ .. attribute:: sample
- By default, ``Variance`` returns the population variance. However,
- if ``sample=True``, the return value will be the sample variance.
+ By default, ``Variance`` returns the population variance. However,
+ if ``sample=True``, the return value will be the sample variance.
-.. admonition:: SQLite
+ .. admonition:: SQLite
- SQLite doesn't provide ``Variance`` out of the box. An implementation is
- available as an extension module for SQLite. Consult the SQlite
- documentation for instructions on obtaining and installing this extension.
+ SQLite doesn't provide ``Variance`` out of the box. An implementation is
+ available as an extension module for SQLite. Consult the SQlite
+ documentation for instructions on obtaining and installing this extension.
Oops, something went wrong.

0 comments on commit 319de16

Please sign in to comment.