Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 319de16ff0687072eefe5487b088af9e7ba11fd0 1 parent a40685f
authored February 16, 2011
6  docs/ref/contrib/admin/index.txt
@@ -1110,6 +1110,8 @@ information.
1110 1110
 ============================
1111 1111
 
1112 1112
 .. class:: InlineModelAdmin
  1113
+.. class:: TabularInline
  1114
+.. class:: StackedInline
1113 1115
 
1114 1116
     The admin interface has the ability to edit models on the same page as a
1115 1117
     parent model. These are called inlines. Suppose you have these two models::
@@ -1134,8 +1136,8 @@ information.
1134 1136
 
1135 1137
     Django provides two subclasses of ``InlineModelAdmin`` and they are:
1136 1138
 
1137  
-        * ``TabularInline``
1138  
-        * ``StackedInline``
  1139
+        * :class:`~django.contrib.admin.TabularInline`
  1140
+        * :class:`~django.contrib.admin.StackedInline`
1139 1141
 
1140 1142
     The difference between these two is merely the template used to render
1141 1143
     them.
20  docs/ref/contrib/formtools/form-preview.txt
@@ -2,7 +2,7 @@
2 2
 Form preview
3 3
 ============
4 4
 
5  
-.. module:: django.contrib.formtools
  5
+.. module:: django.contrib.formtools.preview
6 6
     :synopsis: Displays an HTML form, forces a preview, then does something
7 7
                with the submission.
8 8
 
@@ -26,7 +26,7 @@ application takes care of the following workflow:
26 26
       b. If it's not valid, redisplays the form with error messages.
27 27
    3. When the "confirmation" form is submitted from the preview page, calls
28 28
       a hook that you define -- a
29  
-      :meth:`~django.contrib.formtools.FormPreview.done()` method that gets
  29
+      :meth:`~django.contrib.formtools.preview.FormPreview.done()` method that gets
30 30
       passed the valid data.
31 31
 
32 32
 The framework enforces the required preview by passing a shared-secret hash to
@@ -50,8 +50,8 @@ How to use ``FormPreview``
50 50
               :file:`django/contrib/formtools/templates` directory, and add that
51 51
               directory to your :setting:`TEMPLATE_DIRS` setting.
52 52
 
53  
-    2. Create a :class:`~django.contrib.formtools.FormPreview` subclass that
54  
-       overrides the :meth:`~django.contrib.formtools.FormPreview.done()`
  53
+    2. Create a :class:`~django.contrib.formtools.preview.FormPreview` subclass that
  54
+       overrides the :meth:`~django.contrib.formtools.preview.FormPreview.done()`
55 55
        method::
56 56
 
57 57
            from django.contrib.formtools.preview import FormPreview
@@ -70,7 +70,7 @@ How to use ``FormPreview``
70 70
        is the end result of the form being submitted.
71 71
 
72 72
     3. Change your URLconf to point to an instance of your
73  
-       :class:`~django.contrib.formtools.FormPreview` subclass::
  73
+       :class:`~django.contrib.formtools.preview.FormPreview` subclass::
74 74
 
75 75
            from myapp.preview import SomeModelFormPreview
76 76
            from myapp.forms import SomeModelForm
@@ -89,11 +89,11 @@ How to use ``FormPreview``
89 89
 
90 90
 .. class:: FormPreview
91 91
 
92  
-A :class:`~django.contrib.formtools.FormPreview` class is a simple Python class
  92
+A :class:`~django.contrib.formtools.preview.FormPreview` class is a simple Python class
93 93
 that represents the preview workflow.
94  
-:class:`~django.contrib.formtools.FormPreview` classes must subclass
  94
+:class:`~django.contrib.formtools.preview.FormPreview` classes must subclass
95 95
 ``django.contrib.formtools.preview.FormPreview`` and override the
96  
-:meth:`~django.contrib.formtools.FormPreview.done()` method. They can live
  96
+:meth:`~django.contrib.formtools.preview.FormPreview.done()` method. They can live
97 97
 anywhere in your codebase.
98 98
 
99 99
 ``FormPreview`` templates
@@ -102,8 +102,8 @@ anywhere in your codebase.
102 102
 By default, the form is rendered via the template :file:`formtools/form.html`,
103 103
 and the preview page is rendered via the template :file:`formtools/preview.html`.
104 104
 These values can be overridden for a particular form preview by setting
105  
-:attr:`~django.contrib.formtools.FormPreview.preview_template` and
106  
-:attr:`~django.contrib.formtools.FormPreview.form_template` attributes on the
  105
+:attr:`~django.contrib.formtools.preview.FormPreview.preview_template` and
  106
+:attr:`~django.contrib.formtools.preview.FormPreview.form_template` attributes on the
107 107
 FormPreview subclass. See :file:`django/contrib/formtools/templates` for the
108 108
 default templates.
109 109
 
3  docs/ref/forms/widgets.txt
@@ -160,6 +160,8 @@ commonly used groups of widgets:
160 160
     Takes two optional arguments, ``date_format`` and ``time_format``, which
161 161
     work just like the ``format`` argument for ``DateInput`` and ``TimeInput``.
162 162
 
  163
+.. currentmodule:: django.forms.extras.widgets
  164
+
163 165
 .. class:: SelectDateWidget
164 166
 
165 167
     Wrapper around three select widgets: one each for month, day, and year.
@@ -180,6 +182,7 @@ commonly used groups of widgets:
180 182
 
181 183
 Specifying widgets
182 184
 ------------------
  185
+.. currentmodule:: django.forms
183 186
 
184 187
 .. attribute:: Form.widget
185 188
 
84  docs/ref/models/querysets.txt
@@ -1749,6 +1749,8 @@ SQL equivalents::
1749 1749
 Aggregation functions
1750 1750
 ---------------------
1751 1751
 
  1752
+.. currentmodule:: django.db.models
  1753
+
1752 1754
 Django provides the following aggregation functions in the
1753 1755
 ``django.db.models`` module. For details on how to use these
1754 1756
 aggregate functions, see
@@ -1759,100 +1761,100 @@ Avg
1759 1761
 
1760 1762
 .. class:: Avg(field)
1761 1763
 
1762  
-Returns the mean value of the given field.
  1764
+    Returns the mean value of the given field.
1763 1765
 
1764  
-    * Default alias: ``<field>__avg``
1765  
-    * Return type: float
  1766
+        * Default alias: ``<field>__avg``
  1767
+        * Return type: float
1766 1768
 
1767 1769
 Count
1768 1770
 ~~~~~
1769 1771
 
1770 1772
 .. class:: Count(field, distinct=False)
1771 1773
 
1772  
-Returns the number of objects that are related through the provided field.
  1774
+    Returns the number of objects that are related through the provided field.
1773 1775
 
1774  
-    * Default alias: ``<field>__count``
1775  
-    * Return type: integer
  1776
+        * Default alias: ``<field>__count``
  1777
+        * Return type: integer
1776 1778
 
1777  
-Has one optional argument:
  1779
+    Has one optional argument:
1778 1780
 
1779  
-.. attribute:: distinct
  1781
+    .. attribute:: distinct
1780 1782
 
1781  
-    If distinct=True, the count will only include unique instances. This has
1782  
-    the SQL equivalent of ``COUNT(DISTINCT field)``. Default value is ``False``.
  1783
+        If distinct=True, the count will only include unique instances. This has
  1784
+        the SQL equivalent of ``COUNT(DISTINCT field)``. Default value is ``False``.
1783 1785
 
1784 1786
 Max
1785 1787
 ~~~
1786 1788
 
1787 1789
 .. class:: Max(field)
1788 1790
 
1789  
-Returns the maximum value of the given field.
  1791
+    Returns the maximum value of the given field.
1790 1792
 
1791  
-    * Default alias: ``<field>__max``
1792  
-    * Return type: same as input field
  1793
+        * Default alias: ``<field>__max``
  1794
+        * Return type: same as input field
1793 1795
 
1794 1796
 Min
1795 1797
 ~~~
1796 1798
 
1797 1799
 .. class:: Min(field)
1798 1800
 
1799  
-Returns the minimum value of the given field.
  1801
+    Returns the minimum value of the given field.
1800 1802
 
1801  
-    * Default alias: ``<field>__min``
1802  
-    * Return type: same as input field
  1803
+        * Default alias: ``<field>__min``
  1804
+        * Return type: same as input field
1803 1805
 
1804 1806
 StdDev
1805 1807
 ~~~~~~
1806 1808
 
1807 1809
 .. class:: StdDev(field, sample=False)
1808 1810
 
1809  
-Returns the standard deviation of the data in the provided field.
  1811
+    Returns the standard deviation of the data in the provided field.
1810 1812
 
1811  
-    * Default alias: ``<field>__stddev``
1812  
-    * Return type: float
  1813
+        * Default alias: ``<field>__stddev``
  1814
+        * Return type: float
1813 1815
 
1814  
-Has one optional argument:
  1816
+    Has one optional argument:
1815 1817
 
1816  
-.. attribute:: sample
  1818
+    .. attribute:: sample
1817 1819
 
1818  
-    By default, ``StdDev`` returns the population standard deviation. However,
1819  
-    if ``sample=True``, the return value will be the sample standard deviation.
  1820
+        By default, ``StdDev`` returns the population standard deviation. However,
  1821
+        if ``sample=True``, the return value will be the sample standard deviation.
1820 1822
 
1821  
-.. admonition:: SQLite
  1823
+    .. admonition:: SQLite
1822 1824
 
1823  
-    SQLite doesn't provide ``StdDev`` out of the box. An implementation is
1824  
-    available as an extension module for SQLite. Consult the SQlite
1825  
-    documentation for instructions on obtaining and installing this extension.
  1825
+        SQLite doesn't provide ``StdDev`` out of the box. An implementation is
  1826
+        available as an extension module for SQLite. Consult the SQlite
  1827
+        documentation for instructions on obtaining and installing this extension.
1826 1828
 
1827 1829
 Sum
1828 1830
 ~~~
1829 1831
 
1830 1832
 .. class:: Sum(field)
1831 1833
 
1832  
-Computes the sum of all values of the given field.
  1834
+    Computes the sum of all values of the given field.
1833 1835
 
1834  
-    * Default alias: ``<field>__sum``
1835  
-    * Return type: same as input field
  1836
+        * Default alias: ``<field>__sum``
  1837
+        * Return type: same as input field
1836 1838
 
1837 1839
 Variance
1838 1840
 ~~~~~~~~
1839 1841
 
1840 1842
 .. class:: Variance(field, sample=False)
1841 1843
 
1842  
-Returns the variance of the data in the provided field.
  1844
+    Returns the variance of the data in the provided field.
1843 1845
 
1844  
-    * Default alias: ``<field>__variance``
1845  
-    * Return type: float
  1846
+        * Default alias: ``<field>__variance``
  1847
+        * Return type: float
1846 1848
 
1847  
-Has one optional argument:
  1849
+    Has one optional argument:
1848 1850
 
1849  
-.. attribute:: sample
  1851
+    .. attribute:: sample
1850 1852
 
1851  
-    By default, ``Variance`` returns the population variance. However,
1852  
-    if ``sample=True``, the return value will be the sample variance.
  1853
+        By default, ``Variance`` returns the population variance. However,
  1854
+        if ``sample=True``, the return value will be the sample variance.
1853 1855
 
1854  
-.. admonition:: SQLite
  1856
+    .. admonition:: SQLite
1855 1857
 
1856  
-    SQLite doesn't provide ``Variance`` out of the box. An implementation is
1857  
-    available as an extension module for SQLite. Consult the SQlite
1858  
-    documentation for instructions on obtaining and installing this extension.
  1858
+        SQLite doesn't provide ``Variance`` out of the box. An implementation is
  1859
+        available as an extension module for SQLite. Consult the SQlite
  1860
+        documentation for instructions on obtaining and installing this extension.
356  docs/ref/utils.txt
@@ -35,66 +35,68 @@ to distinguish caches by the ``Accept-language`` header.
35 35
 
36 36
 .. function:: patch_cache_control(response, **kwargs)
37 37
 
38  
-This function patches the ``Cache-Control`` header by adding all keyword
39  
-arguments to it. The transformation is as follows:
  38
+    This function patches the ``Cache-Control`` header by adding all keyword
  39
+    arguments to it. The transformation is as follows:
40 40
 
41  
- * All keyword parameter names are turned to lowercase, and underscores
42  
-   are converted to hyphens.
43  
- * If the value of a parameter is ``True`` (exactly ``True``, not just a
44  
-   true value), only the parameter name is added to the header.
45  
- * All other parameters are added with their value, after applying
46  
-   ``str()`` to it.
  41
+     * All keyword parameter names are turned to lowercase, and underscores
  42
+       are converted to hyphens.
  43
+     * If the value of a parameter is ``True`` (exactly ``True``, not just a
  44
+       true value), only the parameter name is added to the header.
  45
+     * All other parameters are added with their value, after applying
  46
+       ``str()`` to it.
47 47
 
48 48
 .. function:: get_max_age(response)
49 49
 
50  
-Returns the max-age from the response Cache-Control header as an integer (or
51  
-``None`` if it wasn't found or wasn't an integer).
  50
+    Returns the max-age from the response Cache-Control header as an integer
  51
+    (or ``None`` if it wasn't found or wasn't an integer).
52 52
 
53 53
 .. function:: patch_response_headers(response, cache_timeout=None)
54 54
 
55  
-Adds some useful headers to the given ``HttpResponse`` object:
  55
+    Adds some useful headers to the given ``HttpResponse`` object:
56 56
 
57  
- * ``ETag``
58  
- * ``Last-Modified``
59  
- * ``Expires``
60  
- * ``Cache-Control``
  57
+     * ``ETag``
  58
+     * ``Last-Modified``
  59
+     * ``Expires``
  60
+     * ``Cache-Control``
61 61
 
62  
-Each header is only added if it isn't already set.
  62
+    Each header is only added if it isn't already set.
63 63
 
64  
-``cache_timeout`` is in seconds. The ``CACHE_MIDDLEWARE_SECONDS`` setting is
65  
-used by default.
  64
+    ``cache_timeout`` is in seconds. The ``CACHE_MIDDLEWARE_SECONDS`` setting
  65
+    is used by default.
66 66
 
67 67
 .. function:: add_never_cache_headers(response)
68 68
 
69  
-Adds headers to a response to indicate that a page should never be cached.
  69
+    Adds headers to a response to indicate that a page should never be cached.
70 70
 
71 71
 .. function:: patch_vary_headers(response, newheaders)
72 72
 
73  
-Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object.
74  
-``newheaders`` is a list of header names that should be in ``Vary``. Existing
75  
-headers in ``Vary`` aren't removed.
  73
+    Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object.
  74
+    ``newheaders`` is a list of header names that should be in ``Vary``.
  75
+    Existing headers in ``Vary`` aren't removed.
76 76
 
77 77
 .. function:: get_cache_key(request, key_prefix=None)
78 78
 
79  
-Returns a cache key based on the request path. It can be used in the request
80  
-phase because it pulls the list of headers to take into account from the
81  
-global path registry and uses those to build a cache key to check against.
  79
+    Returns a cache key based on the request path. It can be used in the
  80
+    request phase because it pulls the list of headers to take into account
  81
+    from the global path registry and uses those to build a cache key to
  82
+    check against.
82 83
 
83  
-If there is no headerlist stored, the page needs to be rebuilt, so this
84  
-function returns ``None``.
  84
+    If there is no headerlist stored, the page needs to be rebuilt, so this
  85
+    function returns ``None``.
85 86
 
86 87
 .. function:: learn_cache_key(request, response, cache_timeout=None, key_prefix=None)
87 88
 
88  
-Learns what headers to take into account for some request path from the
89  
-response object. It stores those headers in a global path registry so that
90  
-later access to that path will know what headers to take into account without
91  
-building the response object itself. The headers are named in the ``Vary``
92  
-header of the response, but we want to prevent response generation.
  89
+    Learns what headers to take into account for some request path from the
  90
+    response object. It stores those headers in a global path registry so that
  91
+    later access to that path will know what headers to take into account
  92
+    without building the response object itself. The headers are named in
  93
+    the ``Vary`` header of the response, but we want to prevent response
  94
+    generation.
93 95
 
94  
-The list of headers to use for cache key generation is stored in the same cache
95  
-as the pages themselves. If the cache ages some data out of the cache, this
96  
-just means that we have to build the response once to get at the Vary header
97  
-and so at the list of headers to use for the cache key.
  96
+    The list of headers to use for cache key generation is stored in the same
  97
+    cache as the pages themselves. If the cache ages some data out of the
  98
+    cache, this just means that we have to build the response once to get at
  99
+    the Vary header and so at the list of headers to use for the cache key.
98 100
 
99 101
 SortedDict
100 102
 ==========
@@ -102,23 +104,23 @@ SortedDict
102 104
 .. module:: django.utils.datastructures
103 105
    :synopsis: A dictionary that keeps its keys in the order in which they're inserted.
104 106
 
105  
-.. class:: django.utils.datastructures.SortedDict
  107
+.. class:: SortedDict
106 108
 
107  
-Methods
108  
--------
109  
-
110  
-Extra methods that ``SortedDict`` adds to the standard Python ``dict`` class.
  109
+    The :class:`django.utils.datastructures.SortedDict` class is a dictionary
  110
+    that keeps its keys in the order in which they're inserted.
  111
+    ``SortedDict`` adds two additional methods to the standard Python ``dict``
  112
+    class:
111 113
 
112  
-.. method:: insert(index, key, value)
  114
+    .. method:: insert(index, key, value)
113 115
 
114  
-Inserts the key, value pair before the item with the given index.
  116
+        Inserts the key, value pair before the item with the given index.
115 117
 
116  
-.. method:: value_for_index(index)
  118
+    .. method:: value_for_index(index)
117 119
 
118  
-Returns the value of the item at the given zero-based index.
  120
+        Returns the value of the item at the given zero-based index.
119 121
 
120  
-Creating new SortedDict
121  
------------------------
  122
+Creating a new SortedDict
  123
+-------------------------
122 124
 
123 125
 Creating a new ``SortedDict`` must be done in a way where ordering is
124 126
 guaranteed. For example::
@@ -138,48 +140,52 @@ results. Instead do::
138 140
 
139 141
 .. class:: StrAndUnicode
140 142
 
141  
-A class whose ``__str__`` returns its ``__unicode__`` as a UTF-8 bytestring.
142  
-Useful as a mix-in.
  143
+    A class whose ``__str__`` returns its ``__unicode__`` as a UTF-8
  144
+    bytestring. Useful as a mix-in.
143 145
 
144 146
 .. function:: smart_unicode(s, encoding='utf-8', strings_only=False, errors='strict')
145 147
 
146  
-Returns a ``unicode`` object representing ``s``. Treats bytestrings using the
147  
-'encoding' codec.
  148
+    Returns a ``unicode`` object representing ``s``. Treats bytestrings using
  149
+    the 'encoding' codec.
148 150
 
149  
-If ``strings_only`` is ``True``, don't convert (some) non-string-like objects.
  151
+    If ``strings_only`` is ``True``, don't convert (some) non-string-like
  152
+    objects.
150 153
 
151 154
 .. function:: is_protected_type(obj)
152 155
 
153  
-Determine if the object instance is of a protected type.
  156
+    Determine if the object instance is of a protected type.
154 157
 
155  
-Objects of protected types are preserved as-is when passed to
156  
-``force_unicode(strings_only=True)``.
  158
+    Objects of protected types are preserved as-is when passed to
  159
+    ``force_unicode(strings_only=True)``.
157 160
 
158 161
 .. function:: force_unicode(s, encoding='utf-8', strings_only=False, errors='strict')
159 162
 
160  
-Similar to ``smart_unicode``, except that lazy instances are resolved to strings,
161  
-rather than kept as lazy objects.
  163
+    Similar to ``smart_unicode``, except that lazy instances are resolved to
  164
+    strings, rather than kept as lazy objects.
162 165
 
163  
-If ``strings_only`` is ``True``, don't convert (some) non-string-like objects.
  166
+    If ``strings_only`` is ``True``, don't convert (some) non-string-like
  167
+    objects.
164 168
 
165 169
 .. function:: smart_str(s, encoding='utf-8', strings_only=False, errors='strict')
166 170
 
167  
-Returns a bytestring version of ``s``, encoded as specified in ``encoding``.
  171
+    Returns a bytestring version of ``s``, encoded as specified in
  172
+    ``encoding``.
168 173
 
169  
-If ``strings_only`` is ``True``, don't convert (some) non-string-like objects.
  174
+    If ``strings_only`` is ``True``, don't convert (some) non-string-like
  175
+    objects.
170 176
 
171 177
 .. function:: iri_to_uri(iri)
172 178
 
173  
-Convert an Internationalized Resource Identifier (IRI) portion to a URI portion
174  
-that is suitable for inclusion in a URL.
  179
+    Convert an Internationalized Resource Identifier (IRI) portion to a URI
  180
+    portion that is suitable for inclusion in a URL.
175 181
 
176  
-This is the algorithm from section 3.1 of `RFC 3987`_.  However, since we are
177  
-assuming input is either UTF-8 or unicode already, we can simplify things a
178  
-little from the full method.
  182
+    This is the algorithm from section 3.1 of `RFC 3987`_.  However, since we
  183
+    are assuming input is either UTF-8 or unicode already, we can simplify
  184
+    things a little from the full method.
179 185
 
180  
-.. _RFC 3987: http://www.ietf.org/rfc/rfc3987.txt
  186
+    .. _RFC 3987: http://www.ietf.org/rfc/rfc3987.txt
181 187
 
182  
-Returns an ASCII string containing the encoded result.
  188
+    Returns an ASCII string containing the encoded result.
183 189
 
184 190
 ``django.utils.feedgenerator``
185 191
 ==============================
@@ -213,65 +219,64 @@ http://diveintomark.org/archives/2004/02/04/incompatible-rss
213 219
 
214 220
 .. function:: get_tag_uri(url, date)
215 221
 
216  
-Creates a TagURI.
  222
+    Creates a TagURI.
217 223
 
218  
-See http://diveintomark.org/archives/2004/05/28/howto-atom-id
  224
+    See http://diveintomark.org/archives/2004/05/28/howto-atom-id
219 225
 
220 226
 SyndicationFeed
221 227
 ---------------
222 228
 
223 229
 .. class:: SyndicationFeed
224 230
 
225  
-Base class for all syndication feeds. Subclasses should provide write().
226  
-
227  
-Methods
228  
-~~~~~~~
  231
+    Base class for all syndication feeds. Subclasses should provide write().
229 232
 
230  
-.. method:: add_item(title, link, description, [author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=(), item_copyright=None, ttl=None, **kwargs])
  233
+    .. method:: add_item(title, link, description, [author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=(), item_copyright=None, ttl=None, **kwargs])
231 234
 
232  
-Adds an item to the feed. All args are expected to be Python ``unicode``
233  
-objects except ``pubdate``, which is a ``datetime.datetime`` object, and
234  
-``enclosure``, which is an instance of the ``Enclosure`` class.
  235
+        Adds an item to the feed. All args are expected to be Python ``unicode``
  236
+        objects except ``pubdate``, which is a ``datetime.datetime`` object, and
  237
+        ``enclosure``, which is an instance of the ``Enclosure`` class.
235 238
 
236  
-.. method:: num_items()
  239
+    .. method:: num_items()
237 240
 
238  
-.. method:: root_attributes()
  241
+    .. method:: root_attributes()
239 242
 
240  
-Return extra attributes to place on the root (i.e. feed/channel) element.
241  
-Called from write().
  243
+        Return extra attributes to place on the root (i.e. feed/channel)
  244
+        element. Called from write().
242 245
 
243  
-.. method:: add_root_elements(handler)
  246
+    .. method:: add_root_elements(handler)
244 247
 
245  
-Add elements in the root (i.e. feed/channel) element. Called from write().
  248
+        Add elements in the root (i.e. feed/channel) element.
  249
+        Called from write().
246 250
 
247  
-.. method:: item_attributes(item)
  251
+    .. method:: item_attributes(item)
248 252
 
249  
-Return extra attributes to place on each item (i.e. item/entry) element.
  253
+        Return extra attributes to place on each item (i.e. item/entry)
  254
+        element.
250 255
 
251  
-.. method:: add_item_elements(handler, item)
  256
+    .. method:: add_item_elements(handler, item)
252 257
 
253  
-Add elements on each item (i.e. item/entry) element.
  258
+        Add elements on each item (i.e. item/entry) element.
254 259
 
255  
-.. method:: write(outfile, encoding)
  260
+    .. method:: write(outfile, encoding)
256 261
 
257  
-Outputs the feed in the given encoding to ``outfile``, which is a file-like
258  
-object. Subclasses should override this.
  262
+        Outputs the feed in the given encoding to ``outfile``, which is a
  263
+        file-like object. Subclasses should override this.
259 264
 
260  
-.. method:: writeString(encoding)
  265
+    .. method:: writeString(encoding)
261 266
 
262  
-Returns the feed in the given encoding as a string.
  267
+        Returns the feed in the given encoding as a string.
263 268
 
264  
-.. method:: latest_post_date()
  269
+    .. method:: latest_post_date()
265 270
 
266  
-Returns the latest item's ``pubdate``. If none of them have a ``pubdate``,
267  
-this returns the current date/time.
  271
+        Returns the latest item's ``pubdate``. If none of them have a
  272
+        ``pubdate``, this returns the current date/time.
268 273
 
269 274
 Enclosure
270 275
 ---------
271 276
 
272 277
 .. class:: Enclosure
273 278
 
274  
-Represents an RSS enclosure
  279
+    Represents an RSS enclosure
275 280
 
276 281
 RssFeed
277 282
 -------
@@ -283,14 +288,14 @@ Rss201rev2Feed
283 288
 
284 289
 .. class:: Rss201rev2Feed(RssFeed)
285 290
 
286  
-Spec: http://blogs.law.harvard.edu/tech/rss
  291
+    Spec: http://blogs.law.harvard.edu/tech/rss
287 292
 
288 293
 Atom1Feed
289 294
 ---------
290 295
 
291 296
 .. class:: Atom1Feed(SyndicationFeed)
292 297
 
293  
-Spec: http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html
  298
+    Spec: http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html
294 299
 
295 300
 ``django.utils.http``
296 301
 =====================
@@ -300,54 +305,56 @@ Spec: http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html
300 305
 
301 306
 .. function:: urlquote(url, safe='/')
302 307
 
303  
-A version of Python's ``urllib.quote()`` function that can operate on unicode
304  
-strings. The url is first UTF-8 encoded before quoting. The returned string
305  
-can safely be used as part of an argument to a subsequent ``iri_to_uri()``
306  
-call without double-quoting occurring. Employs lazy execution.
  308
+    A version of Python's ``urllib.quote()`` function that can operate on
  309
+    unicode strings. The url is first UTF-8 encoded before quoting. The
  310
+    returned string can safely be used as part of an argument to a subsequent
  311
+    ``iri_to_uri()`` call without double-quoting occurring. Employs lazy
  312
+    execution.
307 313
 
308 314
 .. function:: urlquote_plus(url, safe='')
309 315
 
310  
-A version of Python's urllib.quote_plus() function that can operate on unicode
311  
-strings. The url is first UTF-8 encoded before quoting. The returned string can
312  
-safely be used as part of an argument to a subsequent iri_to_uri() call without
313  
-double-quoting occurring. Employs lazy execution.
  316
+    A version of Python's urllib.quote_plus() function that can operate on
  317
+    unicode strings. The url is first UTF-8 encoded before quoting. The
  318
+    returned string can safely be used as part of an argument to a subsequent
  319
+    ``iri_to_uri()`` call without double-quoting occurring. Employs lazy
  320
+    execution.
314 321
 
315 322
 .. function:: urlencode(query, doseq=0)
316 323
 
317  
-A version of Python's urllib.urlencode() function that can operate on unicode
318  
-strings. The parameters are first case to UTF-8 encoded strings and then
319  
-encoded as per normal.
  324
+    A version of Python's urllib.urlencode() function that can operate on
  325
+    unicode strings. The parameters are first case to UTF-8 encoded strings
  326
+    and then encoded as per normal.
320 327
 
321 328
 .. function:: cookie_date(epoch_seconds=None)
322 329
 
323  
-Formats the time to ensure compatibility with Netscape's cookie standard.
  330
+    Formats the time to ensure compatibility with Netscape's cookie standard.
324 331
 
325  
-Accepts a floating point number expressed in seconds since the epoch, in UTC -
326  
-such as that outputted by ``time.time()``. If set to ``None``, defaults to the current
327  
-time.
  332
+    Accepts a floating point number expressed in seconds since the epoch in
  333
+    UTC--such as that outputted by ``time.time()``. If set to ``None``,
  334
+    defaults to the current time.
328 335
 
329  
-Outputs a string in the format ``Wdy, DD-Mon-YYYY HH:MM:SS GMT``.
  336
+    Outputs a string in the format ``Wdy, DD-Mon-YYYY HH:MM:SS GMT``.
330 337
 
331 338
 .. function:: http_date(epoch_seconds=None)
332 339
 
333  
-Formats the time to match the RFC 1123 date format as specified by HTTP
334  
-`RFC 2616`_ section 3.3.1.
  340
+    Formats the time to match the RFC 1123 date format as specified by HTTP
  341
+    `RFC 2616`_ section 3.3.1.
335 342
 
336  
-.. _RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616.txt
  343
+    .. _RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616.txt
337 344
 
338  
-Accepts a floating point number expressed in seconds since the epoch, in UTC -
339  
-such as that outputted by ``time.time()``. If set to ``None``, defaults to the current
340  
-time.
  345
+    Accepts a floating point number expressed in seconds since the epoch in
  346
+    UTC--such as that outputted by ``time.time()``. If set to ``None``,
  347
+    defaults to the current time.
341 348
 
342  
-Outputs a string in the format ``Wdy, DD Mon YYYY HH:MM:SS GMT``.
  349
+    Outputs a string in the format ``Wdy, DD Mon YYYY HH:MM:SS GMT``.
343 350
 
344 351
 .. function:: base36_to_int(s)
345 352
 
346  
-Converted a base 36 string to an integer
  353
+    Converts a base 36 string to an integer.
347 354
 
348 355
 .. function:: int_to_base36(i)
349 356
 
350  
-Converts an integer to a base36 string
  357
+    Converts an integer to a base 36 string.
351 358
 
352 359
 ``django.utils.safestring``
353 360
 ===========================
@@ -363,28 +370,28 @@ appropriate entities.
363 370
 
364 371
 .. class:: SafeString
365 372
 
366  
-A string subclass that has been specifically marked as "safe" (requires no
367  
-further escaping) for HTML output purposes.
  373
+    A string subclass that has been specifically marked as "safe" (requires no
  374
+    further escaping) for HTML output purposes.
368 375
 
369 376
 .. class:: SafeUnicode
370 377
 
371  
-A unicode subclass that has been specifically marked as "safe" for HTML output
372  
-purposes.
  378
+    A unicode subclass that has been specifically marked as "safe" for HTML
  379
+    output purposes.
373 380
 
374 381
 .. function:: mark_safe(s)
375 382
 
376  
-Explicitly mark a string as safe for (HTML) output purposes. The returned
377  
-object can be used everywhere a string or unicode object is appropriate.
  383
+    Explicitly mark a string as safe for (HTML) output purposes. The returned
  384
+    object can be used everywhere a string or unicode object is appropriate.
378 385
 
379  
-Can be called multiple times on a single string.
  386
+    Can be called multiple times on a single string.
380 387
 
381 388
 .. function:: mark_for_escaping(s)
382 389
 
383  
-Explicitly mark a string as requiring HTML escaping upon output. Has no effect
384  
-on ``SafeData`` subclasses.
  390
+    Explicitly mark a string as requiring HTML escaping upon output. Has no
  391
+    effect on ``SafeData`` subclasses.
385 392
 
386  
-Can be called multiple times on a single string (the resulting escaping is only
387  
-applied once).
  393
+    Can be called multiple times on a single string (the resulting escaping is
  394
+    only applied once).
388 395
 
389 396
 ``django.utils.translation``
390 397
 ============================
@@ -397,97 +404,98 @@ For a complete discussion on the usage of the following see the
397 404
 
398 405
 .. function:: gettext(message)
399 406
 
400  
-Translates ``message`` and returns it in a UTF-8 bytestring
  407
+    Translates ``message`` and returns it in a UTF-8 bytestring
401 408
 
402 409
 .. function:: ugettext(message)
403 410
 
404  
-Translates ``message`` and returns it in a unicode string
  411
+    Translates ``message`` and returns it in a unicode string
405 412
 
406 413
 .. function:: gettext_lazy(message)
407 414
 .. function:: ugettext_lazy(message)
408 415
 
409  
-Same as the non-lazy versions above, but using lazy execution.
  416
+    Same as the non-lazy versions above, but using lazy execution.
410 417
 
411  
-See :ref:`lazy translations documentation <lazy-translations>`.
  418
+    See :ref:`lazy translations documentation <lazy-translations>`.
412 419
 
413 420
 .. function:: gettext_noop(message)
414 421
 
415  
-Marks strings for translation but doesn't translate them now. This can be used
416  
-to store strings in global variables that should stay in the base language
417  
-(because they might be used externally) and will be translated later.
  422
+    Marks strings for translation but doesn't translate them now. This can be
  423
+    used to store strings in global variables that should stay in the base
  424
+    language (because they might be used externally) and will be translated
  425
+    later.
418 426
 
419 427
 .. function:: ngettext(singular, plural, number)
420 428
 
421  
-Translates ``singular`` and ``plural`` and returns the appropriate string
422  
-based on ``number`` in a UTF-8 bytestring
  429
+    Translates ``singular`` and ``plural`` and returns the appropriate string
  430
+    based on ``number`` in a UTF-8 bytestring.
423 431
 
424 432
 .. function:: ungettext(singular, plural, number)
425 433
 
426  
-Translates ``singular`` and ``plural`` and returns the appropriate string based
427  
-on ``number`` in a unicode string
  434
+    Translates ``singular`` and ``plural`` and returns the appropriate string
  435
+    based on ``number`` in a unicode string.
428 436
 
429 437
 .. function:: ngettext_lazy(singular, plural, number)
430 438
 .. function:: ungettext_lazy(singular, plural, number)
431 439
 
432  
-Same as the non-lazy versions above, but using lazy execution.
  440
+    Same as the non-lazy versions above, but using lazy execution.
433 441
 
434  
-See :ref:`lazy translations documentation <lazy-translations>`.
  442
+    See :ref:`lazy translations documentation <lazy-translations>`.
435 443
 
436 444
 .. function:: string_concat(*strings)
437 445
 
438  
-Lazy variant of string concatenation, needed for translations that are
439  
-constructed from multiple parts.
  446
+    Lazy variant of string concatenation, needed for translations that are
  447
+    constructed from multiple parts.
440 448
 
441 449
 .. function:: activate(language)
442 450
 
443  
-Fetches the translation object for a given tuple of application name and
444  
-language and installs it as the current translation object for the current
445  
-thread.
  451
+    Fetches the translation object for a given tuple of application name and
  452
+    language and installs it as the current translation object for the current
  453
+    thread.
446 454
 
447 455
 .. function:: deactivate()
448 456
 
449  
-De-installs the currently active translation object so that further _ calls will
450  
-resolve against the default translation object, again.
  457
+    De-installs the currently active translation object so that further _ calls
  458
+    will resolve against the default translation object, again.
451 459
 
452 460
 .. function:: deactivate_all()
453 461
 
454  
-Makes the active translation object a NullTranslations() instance. This is
455  
-useful when we want delayed translations to appear as the original string for
456  
-some reason.
  462
+    Makes the active translation object a NullTranslations() instance. This is
  463
+    useful when we want delayed translations to appear as the original string
  464
+    for some reason.
457 465
 
458 466
 .. function:: get_language()
459 467
 
460  
-Returns the currently selected language code.
  468
+    Returns the currently selected language code.
461 469
 
462 470
 .. function:: get_language_bidi()
463 471
 
464  
-Returns selected language's BiDi layout:
  472
+    Returns selected language's BiDi layout:
465 473
 
466  
- * ``False`` = left-to-right layout
467  
- * ``True`` = right-to-left layout
  474
+     * ``False`` = left-to-right layout
  475
+     * ``True`` = right-to-left layout
468 476
 
469 477
 .. function:: get_date_formats()
470 478
 
471  
-Checks whether translation files provide a translation for some technical
472  
-message ID to store date and time formats. If it doesn't contain one, the
473  
-formats provided in the settings will be used.
  479
+    Checks whether translation files provide a translation for some technical
  480
+    message ID to store date and time formats. If it doesn't contain one, the
  481
+    formats provided in the settings will be used.
474 482
 
475 483
 .. function:: get_language_from_request(request)
476 484
 
477  
-Analyzes the request to find what language the user wants the system to show.
478  
-Only languages listed in settings.LANGUAGES are taken into account. If the user
479  
-requests a sublanguage where we have a main language, we send out the main
480  
-language.
  485
+    Analyzes the request to find what language the user wants the system to show.
  486
+    Only languages listed in settings.LANGUAGES are taken into account. If the user
  487
+    requests a sublanguage where we have a main language, we send out the main
  488
+    language.
481 489
 
482 490
 .. function:: to_locale(language)
483 491
 
484  
-Turns a language name (en-us) into a locale name (en_US).
  492
+    Turns a language name (en-us) into a locale name (en_US).
485 493
 
486 494
 .. function:: templatize(src)
487 495
 
488  
-Turns a Django template into something that is understood by xgettext. It does
489  
-so by translating the Django translation tags into standard gettext function
490  
-invocations.
  496
+    Turns a Django template into something that is understood by xgettext. It does
  497
+    so by translating the Django translation tags into standard gettext function
  498
+    invocations.
491 499
 
492 500
 ``django.utils.tzinfo``
493 501
 =======================
@@ -497,8 +505,8 @@ invocations.
497 505
 
498 506
 .. class:: FixedOffset
499 507
 
500  
-Fixed offset in minutes east from UTC.
  508
+    Fixed offset in minutes east from UTC.
501 509
 
502 510
 .. class:: LocalTimezone
503 511
 
504  
-Proxy timezone information from time module.
  512
+    Proxy timezone information from time module.
46  docs/topics/auth.txt
@@ -615,6 +615,8 @@ Django provides two functions in :mod:`django.contrib.auth`:
615 615
 Manually checking a user's password
616 616
 -----------------------------------
617 617
 
  618
+.. currentmodule:: django.contrib.auth.models
  619
+
618 620
 .. function:: check_password()
619 621
 
620 622
     If you'd like to manually authenticate a user by comparing a plain-text
@@ -627,6 +629,8 @@ Manually checking a user's password
627 629
 How to log a user out
628 630
 ---------------------
629 631
 
  632
+.. currentmodule:: django.contrib.auth
  633
+
630 634
 .. function:: logout()
631 635
 
632 636
     To log out a user who has been logged in via
@@ -871,11 +875,13 @@ The login_required decorator
871 875
 Other built-in views
872 876
 --------------------
873 877
 
  878
+.. module:: django.contrib.auth.views
  879
+
874 880
 In addition to the :func:`~views.login` view, the authentication system
875 881
 includes a few other useful built-in views located in
876 882
 :mod:`django.contrib.auth.views`:
877 883
 
878  
-.. function:: views.logout(request, [next_page, template_name, redirect_field_name])
  884
+.. function:: logout(request, [next_page, template_name, redirect_field_name])
879 885
 
880 886
     Logs a user out.
881 887
 
@@ -895,7 +901,7 @@ includes a few other useful built-in views located in
895 901
 
896 902
         * ``title``: The string "Logged out", localized.
897 903
 
898  
-.. function:: views.logout_then_login(request[, login_url])
  904
+.. function:: logout_then_login(request[, login_url])
899 905
 
900 906
     Logs a user out, then redirects to the login page.
901 907
 
@@ -904,7 +910,7 @@ includes a few other useful built-in views located in
904 910
         * ``login_url``: The URL of the login page to redirect to. This will
905 911
           default to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied.
906 912
 
907  
-.. function:: views.password_change(request[, template_name, post_change_redirect, password_change_form])
  913
+.. function:: password_change(request[, template_name, post_change_redirect, password_change_form])
908 914
 
909 915
     Allows a user to change their password.
910 916
 
@@ -928,7 +934,7 @@ includes a few other useful built-in views located in
928 934
 
929 935
         * ``form``: The password change form.
930 936
 
931  
-.. function:: views.password_change_done(request[, template_name])
  937
+.. function:: password_change_done(request[, template_name])
932 938
 
933 939
     The page shown after a user has changed their password.
934 940
 
@@ -938,11 +944,14 @@ includes a few other useful built-in views located in
938 944
           default to :file:`registration/password_change_done.html` if not
939 945
           supplied.
940 946
 
941  
-.. function:: views.password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect, from_email])
  947
+.. function:: password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect, from_email])
942 948
 
943 949
     Allows a user to reset their password by generating a one-time use link
944 950
     that can be used to reset the password, and sending that link to the
945 951
     user's registered e-mail address.
  952
+    
  953
+    .. versionchanged:: 1.3
  954
+        The ``from_email`` argument was added.
946 955
 
947 956
     **Optional arguments:**
948 957
 
@@ -964,8 +973,6 @@ includes a few other useful built-in views located in
964 973
         * ``post_reset_redirect``: The URL to redirect to after a successful
965 974
           password change.
966 975
 
967  
-        .. versionchanged:: 1.3
968  
-
969 976
         * ``from_email``: A valid e-mail address. By default Django uses
970 977
           the :setting:`DEFAULT_FROM_EMAIL`.
971 978
 
@@ -973,7 +980,7 @@ includes a few other useful built-in views located in
973 980
 
974 981
         * ``form``: The form for resetting the user's password.
975 982
 
976  
-.. function:: views.password_reset_done(request[, template_name])
  983
+.. function:: password_reset_done(request[, template_name])
977 984
 
978 985
     The page shown after a user has reset their password.
979 986
 
@@ -983,7 +990,7 @@ includes a few other useful built-in views located in
983 990
           default to :file:`registration/password_reset_done.html` if not
984 991
           supplied.
985 992
 
986  
-.. function:: views.redirect_to_login(next[, login_url, redirect_field_name])
  993
+.. function:: redirect_to_login(next[, login_url, redirect_field_name])
987 994
 
988 995
     Redirects to the login page, and then back to another URL after a
989 996
     successful login.
@@ -1001,6 +1008,7 @@ includes a few other useful built-in views located in
1001 1008
           URL to redirect to after log out. Overrides ``next`` if the given
1002 1009
           ``GET`` parameter is passed.
1003 1010
 
  1011
+
1004 1012
 .. function:: password_reset_confirm(request[, uidb36, token, template_name, token_generator, set_password_form, post_reset_redirect])
1005 1013
 
1006 1014
     Presents a form for entering a new password.
@@ -1073,7 +1081,7 @@ provides several built-in forms located in :mod:`django.contrib.auth.forms`:
1073 1081
 Limiting access to logged-in users that pass a test
1074 1082
 ---------------------------------------------------
1075 1083
 
1076  
-.. currentmodule:: django.contrib.auth
  1084
+.. currentmodule:: django.contrib.auth.decorators
1077 1085
 
1078 1086
 To limit access based on certain permissions or some other test, you'd do
1079 1087
 essentially the same thing as described in the previous section.
@@ -1088,7 +1096,7 @@ checks to make sure the user is logged in and has the permission
1088 1096
             return HttpResponse("You can't vote in this poll.")
1089 1097
         # ...
1090 1098
 
1091  
-.. function:: decorators.user_passes_test()
  1099
+.. function:: user_passes_test()
1092 1100
 
1093 1101
     As a shortcut, you can use the convenient ``user_passes_test`` decorator::
1094 1102
 
@@ -1126,7 +1134,7 @@ checks to make sure the user is logged in and has the permission
1126 1134
 The permission_required decorator
1127 1135
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1128 1136
 
1129  
-.. function:: decorators.permission_required()
  1137
+.. function:: permission_required()
1130 1138
 
1131 1139
     It's a relatively common task to check whether a user has a particular
1132 1140
     permission. For that reason, Django provides a shortcut for that case: the
@@ -1155,6 +1163,8 @@ The permission_required decorator
1155 1163
     As in the :func:`~decorators.login_required` decorator, ``login_url``
1156 1164
     defaults to :setting:`settings.LOGIN_URL <LOGIN_URL>`.
1157 1165
 
  1166
+.. currentmodule:: django.contrib.auth
  1167
+
1158 1168
 Limiting access to generic views
1159 1169
 --------------------------------
1160 1170
 
@@ -1249,7 +1259,9 @@ closing tasks.)
1249 1259
 API reference
1250 1260
 -------------
1251 1261
 
1252  
-.. class:: models.Permission
  1262
+.. currentmodule:: django.contrib.auth.models
  1263
+
  1264
+.. class:: Permission
1253 1265
 
1254 1266
     Just like users, permissions are implemented in a Django model that lives
1255 1267
     in `django/contrib/auth/models.py`_.
@@ -1262,16 +1274,16 @@ Fields
1262 1274
 :class:`~django.contrib.auth.models.Permission` objects have the following
1263 1275
 fields:
1264 1276
 
1265  
-.. attribute:: models.Permission.name
  1277
+.. attribute:: Permission.name
1266 1278
 
1267 1279
     Required. 50 characters or fewer. Example: ``'Can vote'``.
1268 1280
 
1269  
-.. attribute:: models.Permission.content_type
  1281
+.. attribute:: Permission.content_type
1270 1282
 
1271 1283
     Required. A reference to the ``django_content_type`` database table, which
1272 1284
     contains a record for each installed Django model.
1273 1285
 
1274  
-.. attribute:: models.Permission.codename
  1286
+.. attribute:: Permission.codename
1275 1287
 
1276 1288
     Required. 100 characters or fewer. Example: ``'can_vote'``.
1277 1289
 
@@ -1281,6 +1293,8 @@ Methods
1281 1293
 :class:`~django.contrib.auth.models.Permission` objects have the standard
1282 1294
 data-access methods like any other :doc:`Django model </ref/models/instances>`.
1283 1295
 
  1296
+.. currentmodule:: django.contrib.auth
  1297
+
1284 1298
 Authentication data in templates
1285 1299
 ================================
1286 1300
 
2  docs/topics/http/decorators.txt
@@ -45,7 +45,7 @@ These decorators can be used to generate ``ETag`` and ``Last-Modified``
45 45
 headers; see
46 46
 :doc:`conditional view processing </topics/conditional-view-processing>`.
47 47
 
48  
-.. currentmodule:: django.views.decorators.http
  48
+.. currentmodule:: django.views.decorators.gzip
49 49
 
50 50
 GZip compression
51 51
 ================
56  docs/topics/http/file-uploads.txt
@@ -2,7 +2,7 @@
2 2
 File Uploads
3 3
 ============
4 4
 
5  
-.. currentmodule:: django.core.files
  5
+.. currentmodule:: django.core.files.uploadedfile
6 6
 
7 7
 When Django handles a file upload, the file data ends up placed in
8 8
 :attr:`request.FILES <django.http.HttpRequest.FILES>` (for more on the
@@ -59,33 +59,40 @@ into the form's constructor; this is how file data gets bound into a form.
59 59
 Handling uploaded files
60 60
 -----------------------
61 61
 
62  
-The final piece of the puzzle is handling the actual file data from
63  
-:attr:`request.FILES <django.http.HttpRequest.FILES>`. Each entry in this
64  
-dictionary is an ``UploadedFile`` object -- a simple wrapper around an uploaded
65  
-file. You'll usually use one of these methods to access the uploaded content:
  62
+.. class:: UploadedFile
  63
+
  64
+    The final piece of the puzzle is handling the actual file data from
  65
+    :attr:`request.FILES <django.http.HttpRequest.FILES>`. Each entry in this
  66
+    dictionary is an ``UploadedFile`` object -- a simple wrapper around an uploaded
  67
+    file. You'll usually use one of these methods to access the uploaded content:
  68
+
  69
+    .. method:: read()
66 70
 
67  
-    ``UploadedFile.read()``
68 71
         Read the entire uploaded data from the file. Be careful with this
69 72
         method: if the uploaded file is huge it can overwhelm your system if you
70 73
         try to read it into memory. You'll probably want to use ``chunks()``
71 74
         instead; see below.
72 75
 
73  
-    ``UploadedFile.multiple_chunks()``
  76
+    .. method:: multiple_chunks()
  77
+
74 78
         Returns ``True`` if the uploaded file is big enough to require
75 79
         reading in multiple chunks. By default this will be any file
76 80
         larger than 2.5 megabytes, but that's configurable; see below.
77 81
 
78  
-    ``UploadedFile.chunks()``
  82
+    .. method:: chunks()
  83
+
79 84
         A generator returning chunks of the file. If ``multiple_chunks()`` is
80 85
         ``True``, you should use this method in a loop instead of ``read()``.
81 86
 
82 87
         In practice, it's often easiest simply to use ``chunks()`` all the time;
83 88
         see the example below.
84 89
 
85  
-    ``UploadedFile.name``
  90
+    .. attribute:: name
  91
+
86 92
         The name of the uploaded file (e.g. ``my_file.txt``).
87 93
 
88  
-    ``UploadedFile.size``
  94
+    .. attribute:: size
  95
+
89 96
         The size, in bytes, of the uploaded file.
90 97
 
91 98
 There are a few other methods and attributes available on ``UploadedFile``
@@ -177,25 +184,26 @@ Three settings control Django's file upload behavior:
177 184
 ``UploadedFile`` objects
178 185
 ========================
179 186
 
180  
-.. class:: UploadedFile
181  
-
182 187
 In addition to those inherited from :class:`File`, all ``UploadedFile`` objects
183 188
 define the following methods/attributes:
184 189
 
185  
-    ``UploadedFile.content_type``
186  
-        The content-type header uploaded with the file (e.g. ``text/plain`` or
187  
-        ``application/pdf``). Like any data supplied by the user, you shouldn't
188  
-        trust that the uploaded file is actually this type. You'll still need to
189  
-        validate that the file contains the content that the content-type header
190  
-        claims -- "trust but verify."
  190
+.. attribute:: UploadedFile.content_type
  191
+
  192
+    The content-type header uploaded with the file (e.g. ``text/plain`` or
  193
+    ``application/pdf``). Like any data supplied by the user, you shouldn't
  194
+    trust that the uploaded file is actually this type. You'll still need to
  195
+    validate that the file contains the content that the content-type header
  196
+    claims -- "trust but verify."
  197
+
  198
+.. attribute:: UploadedFile.charset
  199
+
  200
+    For ``text/*`` content-types, the character set (i.e. ``utf8``) supplied
  201
+    by the browser. Again, "trust but verify" is the best policy here.
191 202
 
192  
-    ``UploadedFile.charset``
193  
-        For ``text/*`` content-types, the character set (i.e. ``utf8``) supplied
194  
-        by the browser. Again, "trust but verify" is the best policy here.
  203 <