Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove duplicate titles in the class based views documentation and re…

…flow the lines.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7083bc5824f719fd96cc9531a315ba220b3fba29 1 parent b05b8cf
Alex Gaynor authored October 18, 2010

Showing 1 changed file with 685 additions and 850 deletions. Show diff stats Hide diff stats

  1. 1,535  docs/ref/class-based-views.txt
1,535  docs/ref/class-based-views.txt
@@ -66,780 +66,675 @@ Simple mixins
66 66
 
67 67
 .. currentmodule:: django.views.generic.base
68 68
 
69  
-TemplateResponseMixin
70  
-~~~~~~~~~~~~~~~~~~~~~
71 69
 .. class:: TemplateResponseMixin()
72 70
 
73  
-**Attributes**
  71
+    .. attribute:: template_name
74 72
 
75  
-.. attribute:: TemplateResponseMixin.template_name
  73
+        The path to the template to use when rendering the view.
76 74
 
77  
-    The path to the template to use when rendering the view.
  75
+    .. method:: render_to_response(context)
78 76
 
79  
-**Methods**
  77
+        Returns a full composed HttpResponse instance, ready to be returned to
  78
+        the user.
80 79
 
81  
-.. method:: TemplateResponseMixin.render_to_response(context)
  80
+        Calls, :meth:`~TemplateResponseMixin.render_template()` to build the
  81
+        content of the response, and
  82
+        :meth:`~TemplateResponseMixin.get_response()` to construct the
  83
+        :class:`~django.http.HttpResponse` object.
82 84
 
83  
-    Returns a full composed HttpResponse instance, ready to be
84  
-    returned to the user.
  85
+    .. method:: get_response(content, **httpresponse_kwargs)
85 86
 
86  
-    Calls, :meth:`~TemplateResponseMixin.render_template()` to build
87  
-    the content of the response, and
88  
-    :meth:`~TemplateResponseMixin.get_response()` to construct the
89  
-    :class:`~django.http.HttpResponse` object.
  87
+        Constructs the :class:`~django.http.HttpResponse` object around the
  88
+        given content. If any keyword arguments are provided, they will be
  89
+        passed to the constructor of the :class:`~django.http.HttpResponse`
  90
+        instance.
90 91
 
91  
-.. method:: TemplateResponseMixin.get_response(content, **httpresponse_kwargs)
  92
+    .. method:: render_template(context)
92 93
 
93  
-    Constructs the :class:`~django.http.HttpResponse` object around
94  
-    the given content. If any keyword arguments are provided, they
95  
-    will be passed to the constructor of the
96  
-    :class:`~django.http.HttpResponse` instance.
  94
+        Calls :meth:`~TemplateResponseMixin.get_context_instance()` to obtain
  95
+        the :class:`Context` instance to use for rendering, and calls
  96
+        :meth:`TemplateReponseMixin.get_template()` to load the template that
  97
+        will be used to render the final content.
97 98
 
98  
-.. method:: TemplateResponseMixin.render_template(context)
  99
+    .. method:: get_context_instance(context)
99 100
 
100  
-    Calls :meth:`~TemplateResponseMixin.get_context_instance()` to
101  
-    obtain the :class:`Context` instance to use for rendering, and
102  
-    calls :meth:`TemplateReponseMixin.get_template()` to load the
103  
-    template that will be used to render the final content.
  101
+        Turns the data dictionary ``context`` into an actual context instance
  102
+        that can be used for rendering.
104 103
 
105  
-.. method:: TemplateResponseMixin.get_context_instance(context)
  104
+        By default, constructs a :class:`~django.template.RequestContext`
  105
+        instance.
106 106
 
107  
-    Turns the data dictionary ``context`` into an actual context
108  
-    instance that can be used for rendering.
  107
+    .. method:: get_template()
109 108
 
110  
-    By default, constructs a :class:`~django.template.RequestContext`
111  
-    instance.
  109
+        Calls :meth:`~TemplateResponseMixin.get_template_names()` to obtain the
  110
+        list of template names that will be searched looking for an existent
  111
+        template.
112 112
 
113  
-.. method:: TemplateResponseMixin.get_template()
  113
+    .. method:: get_template_names()
114 114
 
115  
-    Calls :meth:`~TemplateResponseMixin.get_template_names()` to
116  
-    obtain the list of template names that will be searched looking
117  
-    for an existent template.
  115
+        The list of template names to search for when rendering the template.
118 116
 
119  
-.. method:: TemplateResponseMixin.get_template_names()
  117
+        If :attr:`TemplateResponseMixin.template_name` is specified, the
  118
+        default implementation will return a list containing
  119
+        :attr:`TemplateResponseMixin.template_name` (if it is specified).
120 120
 
121  
-    The list of template names to search for when rendering the
122  
-    template.
  121
+    .. method:: load_template(names)
123 122
 
124  
-    If :attr:`TemplateResponseMixin.template_name` is specified, the
125  
-    default implementation will return a list containing
126  
-    :attr:`TemplateResponseMixin.template_name` (if it is specified).
127  
-
128  
-.. method:: TemplateResponseMixin.load_template(names)
129  
-
130  
-    Loads and returns a template found by searching the list of
131  
-    ``names`` for a match. Uses Django's default template loader.
  123
+        Loads and returns a template found by searching the list of ``names``
  124
+        for a match. Uses Django's default template loader.
132 125
 
133 126
 Single object mixins
134 127
 --------------------
135 128
 
136 129
 .. currentmodule:: django.views.generic.detail
137 130
 
138  
-SingleObjectMixin
139  
-~~~~~~~~~~~~~~~~~
140 131
 .. class:: SingleObjectMixin()
141 132
 
142  
-**Attributes**
143  
-
144  
-.. attribute:: SingleObjectMixin.model
145  
-
146  
-    The model that this view will display data for. Specifying ``model
147  
-    = Foo`` is effectively the same as specifying ``queryset =
148  
-    Foo.objects.all()``.
149  
-
150  
-.. attribute:: SingleObjectMixin.queryset
  133
+    .. attribute:: model
151 134
 
152  
-    A ``QuerySet`` that represents the objects. If provided, the
153  
-    value of :attr:`SingleObjectMixin.queryset` supersedes the
154  
-    value provided for :attr:`SingleObjectMixin.model`.
  135
+        The model that this view will display data for. Specifying ``model
  136
+        = Foo`` is effectively the same as specifying ``queryset =
  137
+        Foo.objects.all()``.
155 138
 
156  
-.. attribute:: SingleObjectMixin.slug_field
  139
+    .. attribute:: queryset
157 140
 
158  
-    The name of the field on the model that contains the slug. By
159  
-    default, ``slug_field`` is ``'slug'``.
  141
+        A ``QuerySet`` that represents the objects. If provided, the value of
  142
+        :attr:`SingleObjectMixin.queryset` supersedes the value provided for
  143
+        :attr:`SingleObjectMixin.model`.
160 144
 
161  
-.. attribute:: SingleObjectMixin.context_object_name
  145
+    .. attribute:: slug_field
162 146
 
163  
-    Designates the name of the variable to use in the context.
  147
+        The name of the field on the model that contains the slug. By default,
  148
+        ``slug_field`` is ``'slug'``.
164 149
 
165  
-**Methods**
  150
+    .. attribute:: context_object_name
166 151
 
167  
-.. method:: SingleObjectMixin.get_queryset()
  152
+        Designates the name of the variable to use in the context.
168 153
 
169  
-    Returns the queryset that will be used to retrieve the object that
170  
-    this view will display.
  154
+    .. method:: get_queryset()
171 155
 
172  
-.. method:: SingleObjectMixin.get_context_object_name(object_list)
  156
+        Returns the queryset that will be used to retrieve the object that this
  157
+        view will display.
173 158
 
174  
-    Return the context variable name that will be used to contain the
175  
-    list of data that this view is manipulating. If object_list is a
176  
-    queryset of Django objects, the context name will be verbose
177  
-    plural name of the model that the queryset is composed from.
  159
+    .. method:: get_context_object_name(object_list)
178 160
 
179  
-.. method:: SingleObjectMixin.get_context_data(**kwargs)
  161
+        Return the context variable name that will be used to contain the list
  162
+        of data that this view is manipulating. If object_list is a queryset of
  163
+        Django objects, the context name will be verbose plural name of the
  164
+        model that the queryset is composed from.
180 165
 
181  
-    Returns context data for displaying the list of objects.
  166
+    .. method:: get_context_data(**kwargs)
182 167
 
183  
-**Context**
  168
+        Returns context data for displaying the list of objects.
184 169
 
185  
-    * ``object``: The object that this view is displaying. If
186  
-      ``context_object_name`` is specified, that variable will also be
187  
-      set in the context, with the same value as ``object``.
  170
+    **Context**
188 171
 
189  
-SingleObjectTemplateResponseMixin
190  
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  172
+        * ``object``: The object that this view is displaying. If
  173
+          ``context_object_name`` is specified, that variable will also be
  174
+          set in the context, with the same value as ``object``.
191 175
 
192 176
 .. class:: SingleObjectTemplateResponseMixin()
193 177
 
194  
-A mixin class that performs template-based response rendering for
195  
-views that operate upon a single object instance. Requires that the
196  
-view it is mixed with provides ``self.object``, the object instance
197  
-that the view is operating on. ``self.object`` will usually be, but is
198  
-not required to be, an instance of a Django model. It may be ``None``
199  
-if the view is in the process of constructing a new instance.
  178
+    A mixin class that performs template-based response rendering for views
  179
+    that operate upon a single object instance. Requires that the view it is
  180
+    mixed with provides ``self.object``, the object instance that the view is
  181
+    operating on. ``self.object`` will usually be, but is not required to be,
  182
+    an instance of a Django model. It may be ``None`` if the view is in the
  183
+    process of constructing a new instance.
200 184
 
201  
-**Extends**
  185
+    **Extends**
202 186
 
203  
-    * :class:`~django.views.generic.base.TemplateResponseMixin`
  187
+        * :class:`~django.views.generic.base.TemplateResponseMixin`
204 188
 
205  
-**Attributes**
  189
+    .. attribute:: template_name_field
206 190
 
207  
-.. attribute:: SingleObjectTemplateResponseMixin.template_name_field
  191
+        The field on the current object instance that can be used to determine
  192
+        the name of a candidate template. If either ``template_name_field`` or
  193
+        the value of the ``template_name_field`` on the current object instance
  194
+        is ``None``, the object will not be interrogated for a candidate
  195
+        template name.
208 196
 
209  
-    The field on the current object instance that can be used to
210  
-    determine the name of a candidate template. If either
211  
-    ``template_name_field`` or the value of the
212  
-    ``template_name_field`` on the current object instance is
213  
-    ``None``, the object will not be interrogated for a candidate
214  
-    template name.
  197
+    .. attribute:: template_name_suffix
215 198
 
216  
-.. attribute:: SingleObjectTemplateResponseMixin.template_name_suffix
  199
+        The suffix to append to the auto-generated candidate template name.
  200
+        Default suffix is ``_detail``.
217 201
 
218  
-    The suffix to append to the auto-generated candidate template name.
219  
-    Default suffix is ``_detail``.
  202
+    .. method:: get_template_names()
220 203
 
221  
-**Methods**
  204
+        Returns a list of candidate template names. Returns the following list:
222 205
 
223  
-.. method:: SingleObjectTemplateResponseMixin.get_template_names()
224  
-
225  
-    Returns a list of candidate template names. Returns the following
226  
-    list:
227  
-
228  
-      * the value of ``template_name`` on the view (if provided)
229  
-      * the contents of the ``template_name_field`` field on the
230  
-        object instance that the view is operating upon (if available)
231  
-      * ``<app_label>/<object_name><template_name_suffix>.html``
  206
+          * the value of ``template_name`` on the view (if provided)
  207
+          * the contents of the ``template_name_field`` field on the
  208
+            object instance that the view is operating upon (if available)
  209
+          * ``<app_label>/<object_name><template_name_suffix>.html``
232 210
 
233 211
 Multiple object mixins
234 212
 ----------------------
235 213
 
236 214
 .. currentmodule:: django.views.generic.list
237 215
 
238  
-MultipleObjectMixin
239  
-~~~~~~~~~~~~~~~~~~~
240 216
 .. class:: MultipleObjectMixin()
241 217
 
242  
-A mixin that can be used to display a list of objects.
243  
-
244  
-If ``paginate_by`` is specified, Django will paginate the results
245  
-returned by this. You can specify the page number in the URL in one of
246  
-two ways:
  218
+    A mixin that can be used to display a list of objects.
247 219
 
248  
-    * Use the ``page`` parameter in the URLconf. For example, this is
249  
-      what your URLconf might look like::
  220
+    If ``paginate_by`` is specified, Django will paginate the results returned
  221
+    by this. You can specify the page number in the URL in one of two ways:
250 222
 
251  
-        (r'^objects/page(?P<page>[0-9]+)/$', PaginatedView.as_view())
  223
+        * Use the ``page`` parameter in the URLconf. For example, this is what
  224
+          your URLconf might look like::
252 225
 
253  
-    * Pass the page number via the ``page`` query-string parameter. For
254  
-      example, a URL would look like this::
  226
+            (r'^objects/page(?P<page>[0-9]+)/$', PaginatedView.as_view())
255 227
 
256  
-        /objects/?page=3
  228
+        * Pass the page number via the ``page`` query-string parameter. For
  229
+          example, a URL would look like this::
257 230
 
258  
-These values and lists are 1-based, not 0-based, so the first page
259  
-would be represented as page ``1``.
  231
+            /objects/?page=3
260 232
 
261  
-For more on pagination, read the :doc:`pagination documentation
262  
-</topics/pagination>`.
  233
+    These values and lists are 1-based, not 0-based, so the first page would be
  234
+    represented as page ``1``.
263 235
 
264  
-As a special case, you are also permitted to use ``last`` as a value
265  
-for ``page``::
  236
+    For more on pagination, read the :doc:`pagination documentation
  237
+    </topics/pagination>`.
266 238
 
267  
-    /objects/?page=last
  239
+    As a special case, you are also permitted to use ``last`` as a value for
  240
+    ``page``::
268 241
 
269  
-This allows you to access the final page of results without first
270  
-having to determine how many pages there are.
  242
+        /objects/?page=last
271 243
 
272  
-Note that ``page`` *must* be either a valid page number or the value
273  
-``last``; any other value for ``page`` will result in a 404 error.
  244
+    This allows you to access the final page of results without first having to
  245
+    determine how many pages there are.
274 246
 
275  
-**Attributes**
  247
+    Note that ``page`` *must* be either a valid page number or the value
  248
+    ``last``; any other value for ``page`` will result in a 404 error.
276 249
 
277  
-.. attribute:: MultipleObjectMixin.allow_empty
  250
+    .. attribute:: allow_empty
278 251
 
279  
-    A boolean specifying whether to display the page if no objects are
280  
-    available. If this is ``False`` and no objects are available, the
281  
-    view will raise a 404 instead of displaying an empty page. By
282  
-    default, this is ``True``.
  252
+        A boolean specifying whether to display the page if no objects are
  253
+        available. If this is ``False`` and no objects are available, the view
  254
+        will raise a 404 instead of displaying an empty page. By default, this
  255
+        is ``True``.
283 256
 
284  
-.. attribute:: MultipleObjectMixin.model
  257
+    .. attribute:: model
285 258
 
286  
-    The model that this view will display data for. Specifying ``model
287  
-    = Foo`` is effectively the same as specifying ``queryset =
288  
-    Foo.objects.all()``.
  259
+        The model that this view will display data for. Specifying ``model
  260
+        = Foo`` is effectively the same as specifying ``queryset =
  261
+        Foo.objects.all()``.
289 262
 
290  
-.. attribute:: MultipleObjectMixin.queryset
  263
+    .. attribute:: queryset
291 264
 
292  
-    A ``QuerySet`` that represents the objects. If provided, the
293  
-    value of :attr:`MultipleObjectMixin.queryset` supersedes the
294  
-    value provided for :attr:`MultipleObjectMixin.model`.
  265
+        A ``QuerySet`` that represents the objects. If provided, the value of
  266
+        :attr:`MultipleObjectMixin.queryset` supersedes the value provided for
  267
+        :attr:`MultipleObjectMixin.model`.
295 268
 
296  
-.. attribute:: MultipleObjectMixin.paginate_by
  269
+    .. attribute:: paginate_by
297 270
 
298  
-    An integer specifying how many objects should be displayed per
299  
-    page. If this is given, the view will paginate objects with
300  
-    :attr:`MultipleObjectMixin.paginate_by` objects per page. The view
301  
-    will expect either a ``page`` query string parameter (via ``GET``)
302  
-    or a ``page`` variable specified in the URLconf.
  271
+        An integer specifying how many objects should be displayed per page. If
  272
+        this is given, the view will paginate objects with
  273
+        :attr:`MultipleObjectMixin.paginate_by` objects per page. The view will
  274
+        expect either a ``page`` query string parameter (via ``GET``) or a
  275
+        ``page`` variable specified in the URLconf.
303 276
 
304  
-.. attribute:: MultipleObjectMixin.context_object_name
  277
+    .. attribute:: context_object_name
305 278
 
306  
-    Designates the name of the variable to use in the context.
  279
+        Designates the name of the variable to use in the context.
307 280
 
308  
-**Methods**
  281
+    .. method:: get_queryset()
309 282
 
310  
-.. method:: MultipleObjectMixin.get_queryset()
  283
+        Returns the queryset that represents the data this view will display.
311 284
 
312  
-    Returns the queryset that represents the data this view will display.
  285
+    .. method:: paginate_queryset(queryset, page_size)
313 286
 
314  
-.. method:: MultipleObjectMixin.paginate_queryset(queryset, page_size)
  287
+        Returns a 4-tuple containing (``paginator``, ``page``, ``object_list``,
  288
+        ``is_paginated``).
315 289
 
316  
-    Returns a 4-tuple containing (``paginator``, ``page``,
317  
-    ``object_list``, ``is_paginated``).
  290
+        Constructed by paginating ``queryset`` into pages of size ``page_size``.
  291
+        If the request contains a ``page`` argument, either as a captured URL
  292
+        argument or as a GET argument, ``object_list`` will correspond to the
  293
+        objects from that page.
318 294
 
319  
-    constructed by paginating ``queryset`` into pages of size ``page_size``.
320  
-    If the request contains a ``page`` argument, either as a captured
321  
-    URL argument or as a GET argument, ``object_list`` will correspond
322  
-    to the objects from that page.
  295
+    .. method:: get_paginate_by(queryset)
323 296
 
324  
-.. method:: MultipleObjectMixin.get_paginate_by(queryset)
  297
+    .. method:: get_allow_empty()
325 298
 
326  
-.. method:: MultipleObjectMixin.get_allow_empty()
  299
+        Return a boolean specifying whether to display the page if no objects
  300
+        are available. If this method returns ``False`` and no objects are
  301
+        available, the view will raise a 404 instead of displaying an empty
  302
+        page. By default, this is ``True``.
327 303
 
328  
-    Return a boolean specifying whether to display the page if no objects are
329  
-    available. If this method returns ``False`` and no objects are available, the
330  
-    view will raise a 404 instead of displaying an empty page. By
331  
-    default, this is ``True``.
  304
+    .. method:: get_context_object_name(object_list)
332 305
 
333  
-.. method:: MultipleObjectMixin.get_context_object_name(object_list)
  306
+        Return the context variable name that will be used to contain the list
  307
+        of data that this view is manipulating. If object_list is a queryset of
  308
+        Django objects, the context name will be verbose plural name of the
  309
+        model that the queryset is composed from.
334 310
 
335  
-    Return the context variable name that will be used to contain the
336  
-    list of data that this view is manipulating. If object_list is a
337  
-    queryset of Django objects, the context name will be verbose
338  
-    plural name of the model that the queryset is composed from.
  311
+    .. method:: get_context_data(**kwargs)
339 312
 
340  
-.. method:: MultipleObjectMixin.get_context_data(**kwargs)
  313
+        Returns context data for displaying the list of objects.
341 314
 
342  
-    Returns context data for displaying the list of objects.
  315
+    **Context**
343 316
 
344  
-**Context**
  317
+        * ``object_list``: The list of object that this view is displaying. If
  318
+          ``context_object_name`` is specified, that variable will also be set
  319
+          in the context, with the same value as ``object_list``.
345 320
 
346  
-    * ``object_list``: The list of object that this view is
347  
-      displaying. If ``context_object_name`` is specified, that
348  
-      variable will also be set in the context, with the same value as
349  
-      ``object_list``.
  321
+        * ``is_paginated``: A boolean representing whether the results are
  322
+          paginated. Specifically, this is set to ``False`` if no page size has
  323
+          been specified, or if the number of available objects is less than or
  324
+          equal to ``paginate_by``.
350 325
 
351  
-    * ``is_paginated``: A boolean representing whether the results are
352  
-      paginated. Specifically, this is set to ``False`` if no page
353  
-      size has been specified, or if the number of available objects
354  
-      is less than or equal to ``paginate_by``.
  326
+        * ``paginator``: An instance of
  327
+          :class:`django.core.paginator.Paginator`. If the page is not
  328
+          paginated, this context variable will be ``None``
355 329
 
356  
-    * ``paginator``: An instance of
357  
-      :class:`django.core.paginator.Paginator`. If the page is not
358  
-      paginated, this context variable will be ``None``
  330
+        * ``page_obj``: An instance of
  331
+          :class:`django.core.paginator.Page`. If the page is not paginated,
  332
+          this context variable will be ``None``
359 333
 
360  
-    * ``page_obj``: An instance of
361  
-      :class:`django.core.paginator.Page`. If the page is not
362  
-      paginated, this context variable will be ``None``
363  
-
364  
-MultipleObjectTemplateResponseMixin
365  
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
366 334
 .. class:: MultipleObjectTemplateResponseMixin()
367 335
 
368  
-A mixin class that performs template-based response rendering for
369  
-views that operate upon a list of object instances. Requires that the
370  
-view it is mixed with provides ``self.object_list``, the list of
371  
-object instances that the view is operating on. ``self.object_list``
372  
-may be, but is not required to be, a
373  
-:class:`~django.db.models.Queryset`.
374  
-
375  
-**Extends**
  336
+    A mixin class that performs template-based response rendering for views
  337
+    that operate upon a list of object instances. Requires that the view it is
  338
+    mixed with provides ``self.object_list``, the list of object instances that
  339
+    the view is operating on. ``self.object_list`` may be, but is not required
  340
+    to be, a :class:`~django.db.models.Queryset`.
376 341
 
377  
-    * :class:`~django.views.generic.base.TemplateResponseMixin`
  342
+    **Extends**
378 343
 
379  
-**Attributes**
  344
+        * :class:`~django.views.generic.base.TemplateResponseMixin`
380 345
 
381  
-.. attribute:: MultipleObjectTemplateResponseMixin.template_name_suffix
  346
+    .. attribute:: template_name_suffix
382 347
 
383  
-    The suffix to append to the auto-generated candidate template name.
384  
-    Default suffix is ``_list``.
  348
+        The suffix to append to the auto-generated candidate template name.
  349
+        Default suffix is ``_list``.
385 350
 
386  
-**Methods**
  351
+    .. method:: get_template_names()
387 352
 
388  
-.. method:: MultipleObjectTemplateResponseMixin.get_template_names()
  353
+        Returns a list of candidate template names. Returns the following list:
389 354
 
390  
-    Returns a list of candidate template names. Returns the following
391  
-    list:
392  
-
393  
-      * the value of ``template_name`` on the view (if provided)
394  
-      * ``<app_label>/<object_name><template_name_suffix>.html``
  355
+          * the value of ``template_name`` on the view (if provided)
  356
+          * ``<app_label>/<object_name><template_name_suffix>.html``
395 357
 
396 358
 Editing mixins
397 359
 --------------
398 360
 
399 361
 .. currentmodule:: django.views.generic.edit
400 362
 
401  
-FormMixin
402  
-~~~~~~~~~
403 363
 .. class:: FormMixin()
404 364
 
405  
-A mixin class that provides facilities for creating and displaying forms.
406  
-
407  
-**Attributes**
408  
-
409  
-.. attribute:: FormMixin.initial
  365
+    A mixin class that provides facilities for creating and displaying forms.
410 366
 
411  
-    A dictionary containing initial data for the form.
  367
+    .. attribute:: initial
412 368
 
413  
-.. attribute:: FormMixin.form_class
  369
+        A dictionary containing initial data for the form.
414 370
 
415  
-    The form class to instantiate.
  371
+    .. attribute:: form_class
416 372
 
417  
-.. attribute:: FormMixin.success_url
  373
+        The form class to instantiate.
418 374
 
419  
-    The URL to redirect to when the form is successfully processed.
  375
+    .. attribute:: success_url
420 376
 
421  
-**Methods**
  377
+        The URL to redirect to when the form is successfully processed.
422 378
 
423  
-.. method:: FormMixin.get_initial()
  379
+    .. method:: get_initial()
424 380
 
425  
-    Retrieve initial data for the form. By default, returns
426  
-    :attr:`FormMixin.initial`.
  381
+        Retrieve initial data for the form. By default, returns
  382
+        :attr:`FormMixin.initial`.
427 383
 
428  
-.. method:: FormMixin.get_form_class()
  384
+    .. method:: get_form_class()
429 385
 
430  
-    Retrieve the form class to instantiate. By default,
431  
-    :attr:`FormMixin.form_class`.
  386
+        Retrieve the form class to instantiate. By default,
  387
+        :attr:`FormMixin.form_class`.
432 388
 
433  
-.. method:: FormMixin.get_form(form_class)
  389
+    .. method:: get_form(form_class)
434 390
 
435  
-    Instantiate an instance of ``form_class``. If the request is a
436  
-    ``POST`` or ``PUT``, the request data (``request.POST`` and
437  
-    ``request.FILES``) will be provided to the form at time of
438  
-    construction
  391
+        Instantiate an instance of ``form_class``. If the request is a ``POST``
  392
+        or ``PUT``, the request data (``request.POST`` and ``request.FILES``)
  393
+        will be provided to the form at time of construction.
439 394
 
440  
-.. method:: FormMixin.get_success_url()
  395
+    .. method:: get_success_url()
441 396
 
442  
-    Determine the URL to redirect to when the form is successfully
443  
-    validated. Returns :attr:`FormMixin.success_url` by default.
  397
+        Determine the URL to redirect to when the form is successfully
  398
+        validated. Returns :attr:`FormMixin.success_url` by default.
444 399
 
445  
-.. method:: FormMixin.form_valid()
  400
+    .. method:: form_valid()
446 401
 
447  
-    Redirects to :attr:`ModelFormMixin.success_url`.
  402
+        Redirects to :attr:`ModelFormMixin.success_url`.
448 403
 
449  
-.. method:: FormMixin.form_invalid()
  404
+    .. method:: form_invalid()
450 405
 
451  
-    Renders a response, providing the invalid form as context.
  406
+        Renders a response, providing the invalid form as context.
452 407
 
453  
-.. method:: FormMixin.get_context_data(**kwargs)
  408
+    .. method:: get_context_data(**kwargs)
454 409
 
455  
-    Populates a context containing the contents of ``kwargs``.
  410
+        Populates a context containing the contents of ``kwargs``.
456 411
 
457  
-**Context**
  412
+    **Context**
458 413
 
459  
-    * ``form``: The form instance that was generated for the view.
  414
+        * ``form``: The form instance that was generated for the view.
460 415
 
461  
-**Notes**
  416
+    **Notes**
462 417
 
463  
-    * Views mixing :class:`~django.views.generic.edit.FormMixin` must
464  
-      provide an implementation of :meth:`~FormMixin.form_valid()` and
465  
-      :meth:`~FormMixin.form_invalid()`.
  418
+        * Views mixing :class:`~django.views.generic.edit.FormMixin` must
  419
+          provide an implementation of :meth:`~FormMixin.form_valid()` and
  420
+          :meth:`~FormMixin.form_invalid()`.
466 421
 
467  
-ModelFormMixin
468  
-~~~~~~~~~~~~~~
469 422
 .. class:: ModelFormMixin()
470 423
 
471  
-A form mixin that works on ModelForms, rather than a standalone form.
472  
-
473  
-Since this is a subclass of
474  
-:class:`~django.views.generic.detail.SingleObjectMixin`, instances of
475  
-this mixin have access to the :attr:`~SingleObjectMixin.model`` and
476  
-:attr:`~SingleObjectMixin.queryset`` attributes, describing the type of
477  
-object that the ModelForm is manipulating. The view also provides
478  
-``self.object``, the instance being manipulated. If the instance is
479  
-being created, ``self.object`` will be ``None``
480  
-
481  
-**Mixins**
  424
+    A form mixin that works on ModelForms, rather than a standalone form.
482 425
 
483  
-    * :class:`django.views.generic.forms.FormMixin`
484  
-    * :class:`django.views.generic.detail.SingleObjectMixin`
  426
+    Since this is a subclass of
  427
+    :class:`~django.views.generic.detail.SingleObjectMixin`, instances of this
  428
+    mixin have access to the :attr:`~SingleObjectMixin.model`` and
  429
+    :attr:`~SingleObjectMixin.queryset`` attributes, describing the type of
  430
+    object that the ModelForm is manipulating. The view also provides
  431
+    ``self.object``, the instance being manipulated. If the instance is being
  432
+    created, ``self.object`` will be ``None``
485 433
 
486  
-**Attributes**
  434
+    **Mixins**
487 435
 
488  
-.. attribute:: ModelFormMixin.success_url
  436
+        * :class:`django.views.generic.forms.FormMixin`
  437
+        * :class:`django.views.generic.detail.SingleObjectMixin`
489 438
 
490  
-    The URL to redirect to when the form is successfully processed.
  439
+    .. attribute:: success_url
491 440
 
492  
-**Methods**
  441
+        The URL to redirect to when the form is successfully processed.
493 442
 
494  
-.. method:: ModelFormMixin.get_form_class()
  443
+    .. method:: get_form_class()
495 444
 
496  
-    Retrieve the form class to instantiate. If
497  
-    :attr:`FormMixin.form_class` is provided, that class will be used.
498  
-    Otherwise, a ModelForm will be instantiated using the model
499  
-    associated with the :attr:`~SingleObjectMixin.queryset``, or with
500  
-    the :attr:`~SingleObjectMixin.model``, depending on which
501  
-    attribute is provided.
  445
+        Retrieve the form class to instantiate. If
  446
+        :attr:`FormMixin.form_class` is provided, that class will be used.
  447
+        Otherwise, a ModelForm will be instantiated using the model associated
  448
+        with the :attr:`~SingleObjectMixin.queryset``, or with the
  449
+        :attr:`~SingleObjectMixin.model``, depending on which attribute is
  450
+        provided.
502 451
 
503  
-.. method:: FormMixin.get_form(form_class)
  452
+    .. method:: get_form(form_class)
504 453
 
505  
-    Instantiate an instance of ``form_class``. If the request is a
506  
-    ``POST`` or ``PUT``, the request data (``request.POST`` and
507  
-    ``request.FILES``) will be provided to the form at time of
508  
-    construction. The current instance (``self.object``) will also
509  
-    be provided.
  454
+        Instantiate an instance of ``form_class``. If the request is a ``POST``
  455
+        or ``PUT``, the request data (``request.POST`` and ``request.FILES``)
  456
+        will be provided to the form at time of construction. The current
  457
+        instance (``self.object``) will also be provided.
510 458
 
511  
-.. method:: ModelFormMixin.get_success_url()
  459
+    .. method:: get_success_url()
512 460
 
513  
-    Determine the URL to redirect to when the form is successfully
514  
-    validated. Returns :attr:`FormMixin.success_url` if it is
515  
-    provided; otherwise, attempts to use the ``get_absolute_url()``
516  
-    of the object.
  461
+        Determine the URL to redirect to when the form is successfully
  462
+        validated. Returns :attr:`FormMixin.success_url` if it is provided;
  463
+        otherwise, attempts to use the ``get_absolute_url()`` of the object.
517 464
 
518  
-.. method:: ModelFormMixin.form_valid()
  465
+    .. method:: form_valid()
519 466
 
520  
-    Saves the form instance, sets the current object for the view,
521  
-    and redirects to :attr:`ModelFormMixin.success_url`.
  467
+        Saves the form instance, sets the current object for the view, and
  468
+        redirects to :attr:`ModelFormMixin.success_url`.
522 469
 
523  
-.. method:: ModelFormMixin.form_invalid()
  470
+    .. method:: form_invalid()
524 471
 
525  
-    Renders a response, providing the invalid form as context.
  472
+        Renders a response, providing the invalid form as context.
526 473
 
527  
-ProcessFormView
528  
-~~~~~~~~~~~~~~~
529 474
 .. class:: ProcessFormView()
530 475
 
531  
-A mixin that provides basic HTTP GET and POST workflow.
  476
+    A mixin that provides basic HTTP GET and POST workflow.
532 477
 
533  
-On GET:
534  
-    * Construct a form
535  
-    * Render a response using a context that contains that form
  478
+    On GET:
  479
+        * Construct a form
  480
+        * Render a response using a context that contains that form
536 481
 
537  
-On POST:
538  
-    * Construct a form
539  
-    * Check the form for validity, and handle accordingly.
  482
+    On POST:
  483
+        * Construct a form
  484
+        * Check the form for validity, and handle accordingly.
540 485
 
541  
-The PUT action is also handled, as an analog of POST.
  486
+    The PUT action is also handled, as an analog of POST.
542 487
 
543  
-DeletionMixin
544  
-~~~~~~~~~~~~~
545 488
 .. class:: DeletionMixin()
546 489
 
547  
-Enables handling of the ``DELETE`` http action.
  490
+    Enables handling of the ``DELETE`` http action.
548 491
 
549  
-**Attributes**
  492
+    .. attribute:: success_url
550 493
 
551  
-.. attribute:: DeletionMixin.success_url
  494
+        The url to redirect to when the nominated object has been
  495
+        successfully deleted.
552 496
 
553  
-    The url to redirect to when the nominated object has been
554  
-    successfully deleted.
  497
+    .. attribute:: get_success_url(obj)
555 498
 
556  
-**Methods**
557  
-
558  
-.. attribute:: DeletionMixin.get_success_url(obj)
559  
-
560  
-    Returns the url to redirect to when the nominated object has been
561  
-    successfully deleted. Returns
562  
-    :attr:`~django.views.generic.edit.DeletionMixin.success_url` by
563  
-    default.
  499
+        Returns the url to redirect to when the nominated object has been
  500
+        successfully deleted. Returns
  501
+        :attr:`~django.views.generic.edit.DeletionMixin.success_url` by
  502
+        default.
564 503
 
565 504
 Date-based mixins
566 505
 -----------------
567 506
 
568 507
 .. currentmodule:: django.views.generic.dates
569 508
 
570  
-YearMixin
571  
-~~~~~~~~~
572 509
 .. class:: YearMixin()
573 510
 
574  
-A mixin that can be used to retrieve and provide parsing information
575  
-for a year component of a date.
576  
-
577  
-**Attributes**
  511
+    A mixin that can be used to retrieve and provide parsing information for a
  512
+    year component of a date.
578 513
 
579  
-.. attribute:: YearMixin.year_format
  514
+    .. attribute:: year_format
580 515
 
581  
-    The strftime_ format to use when parsing the year. By default,
582  
-    this is ``'%Y'``.
  516
+        The strftime_ format to use when parsing the year. By default, this is
  517
+        ``'%Y'``.
583 518
 
584  
-.. _strftime: http://docs.python.org/library/time.html#time.strftime
  519
+    .. _strftime: http://docs.python.org/library/time.html#time.strftime
585 520
 
586  
-.. attribute:: YearMixin.year
  521
+    .. attribute:: year
587 522
 
588  
-    **Optional** The value for the year (as a string). By default,
589  
-    set to ``None``, which means the year will be determined using
590  
-    other means.
  523
+        **Optional** The value for the year (as a string). By default, set to
  524
+        ``None``, which means the year will be determined using other means.
591 525
 
592  
-**Methods**
  526
+    .. method:: get_year_format()
593 527
 
594  
-.. method:: YearMixin.get_year_format()
  528
+        Returns the strftime_ format to use when parsing the year. Returns
  529
+        :attr:`YearMixin.year_format` by default.
595 530
 
596  
-    Returns the strftime_ format to use when parsing the year. Returns
597  
-    :attr:`YearMixin.year_format` by default.
  531
+    .. method:: get_year()
598 532
 
599  
-.. method:: YearMixin.get_year()
  533
+        Returns the year for which this view will display data. Tries the
  534
+        following sources, in order:
600 535
 
601  
-    Returns the year for which this view will display data. Tries the
602  
-    following sources, in order:
  536
+            * The value of the :attr:`YearMixin.year` attribute.
  537
+            * The value of the `year` argument captured in the URL pattern
  538
+            * The value of the `year` GET query argument.
603 539
 
604  
-        * The value of the :attr:`YearMixin.year` attribute.
605  
-        * The value of the `year` argument captured in the URL pattern
606  
-        * The value of the `year` GET query argument.
  540
+        Raises a 404 if no valid year specification can be found.
607 541
 
608  
-    Raises a 404 if no valid year specification can be found.
609  
-
610  
-MonthMixin
611  
-~~~~~~~~~~
612 542
 .. class:: MonthMixin()
613 543
 
614  
-A mixin that can be used to retrieve and provide parsing information
615  
-for a month component of a date.
616  
-
617  
-**Attributes**
  544
+    A mixin that can be used to retrieve and provide parsing information for a
  545
+    month component of a date.
618 546
 
619  
-.. attribute:: MonthMixin.month_format
  547
+    .. attribute:: month_format
620 548
 
621  
-    The strftime_ format to use when parsing the month. By default,
622  
-    this is ``'%b'``.
  549
+        The strftime_ format to use when parsing the month. By default, this is
  550
+        ``'%b'``.
623 551
 
624  
-.. attribute:: MonthMixin.month
  552
+    .. attribute:: month
625 553
 
626  
-    **Optional** The value for the month (as a string). By default,
627  
-    set to ``None``, which means the month will be determined using
628  
-    other means.
  554
+        **Optional** The value for the month (as a string). By default, set to
  555
+        ``None``, which means the month will be determined using other means.
629 556
 
630  
-**Methods**
  557
+    .. method:: get_month_format()
631 558
 
632  
-.. method:: MonthMixin.get_month_format()
  559
+        Returns the strftime_ format to use when parsing the month. Returns
  560
+        :attr:`MonthMixin.month_format` by default.
633 561
 
634  
-    Returns the strftime_ format to use when parsing the month. Returns
635  
-    :attr:`MonthMixin.month_format` by default.
  562
+    .. method:: get_month()
636 563
 
637  
-.. method:: MonthMixin.get_month()
  564
+        Returns the month for which this view will display data. Tries the
  565
+        following sources, in order:
638 566
 
639  
-    Returns the month for which this view will display data. Tries the
640  
-    following sources, in order:
  567
+            * The value of the :attr:`MonthMixin.month` attribute.
  568
+            * The value of the `month` argument captured in the URL pattern
  569
+            * The value of the `month` GET query argument.
641 570
 
642  
-        * The value of the :attr:`MonthMixin.month` attribute.
643  
-        * The value of the `month` argument captured in the URL pattern
644  
-        * The value of the `month` GET query argument.
  571
+        Raises a 404 if no valid month specification can be found.
645 572
 
646  
-    Raises a 404 if no valid month specification can be found.
  573
+    .. method:: get_next_month(date)
647 574
 
648  
-.. method:: MonthMixin.get_next_month(date)
  575
+        Returns a date object containing the first day of the month after the
  576
+        date provided. Returns `None`` if mixed with a view that sets
  577
+        ``allow_future = False``, and the next month is in the future. If
  578
+        ``allow_empty = False``, returns the next month that contains data.
649 579
 
650  
-    Returns a date object containing the first day of the month after
651  
-    the date provided. Returns `None`` if mixed with a view that sets
652  
-    ``allow_future = False``, and the next month is in the future.
653  
-    If ``allow_empty = False``, returns the next month that contains
654  
-    data.
  580
+    .. method:: get_prev_month(date)
655 581
 
656  
-.. method:: MonthMixin.get_prev_month(date)
  582
+        Returns a date object containing the first day of the month before the
  583
+        date provided. If ``allow_empty = False``, returns the previous month
  584
+        that contained data.
657 585
 
658  
-    Returns a date object containing the first day of the month before
659  
-    the date provided. If ``allow_empty = False``, returns the previous
660  
-    month that contained data.
661  
-
662  
-DayMixin
663  
-~~~~~~~~~
664 586
 .. class:: DayMixin()
665 587
 
666  
-A mixin that can be used to retrieve and provide parsing information
667  
-for a day component of a date.
668  
-
669  
-**Attributes**
670  
-
671  
-.. attribute:: DayMixin.day_format
  588
+    A mixin that can be used to retrieve and provide parsing information for a
  589
+    day component of a date.
672 590
 
673  
-    The strftime_ format to use when parsing the day. By default,
674  
-    this is ``'%d'``.
  591
+    .. attribute:: day_format
675 592
 
676  
-.. attribute:: DayMixin.day
  593
+        The strftime_ format to use when parsing the day. By default, this is
  594
+        ``'%d'``.
677 595
 
678  
-    **Optional** The value for the day (as a string). By default,
679  
-    set to ``None``, which means the day will be determined using
680  
-    other means.
  596
+    .. attribute:: day
681 597
 
682  
-**Methods**
  598
+        **Optional** The value for the day (as a string). By default, set to
  599
+        ``None``, which means the day will be determined using other means.
683 600
 
684  
-.. method:: DayMixin.get_day_format()
  601
+    .. method:: get_day_format()
685 602
 
686  
-    Returns the strftime_ format to use when parsing the day. Returns
687  
-    :attr:`DayMixin.day_format` by default.
  603
+        Returns the strftime_ format to use when parsing the day. Returns
  604
+        :attr:`DayMixin.day_format` by default.
688 605
 
689  
-.. method:: DayMixin.get_day()
  606
+    .. method:: get_day()
690 607
 
691  
-    Returns the day for which this view will display data. Tries the
692  
-    following sources, in order:
  608
+        Returns the day for which this view will display data. Tries the
  609
+        following sources, in order:
693 610
 
694  
-        * The value of the :attr:`DayMixin.day` attribute.
695  
-        * The value of the `day` argument captured in the URL pattern
696  
-        * The value of the `day` GET query argument.
  611
+            * The value of the :attr:`DayMixin.day` attribute.
  612
+            * The value of the `day` argument captured in the URL pattern
  613
+            * The value of the `day` GET query argument.
697 614
 
698  
-    Raises a 404 if no valid day specification can be found.
  615
+        Raises a 404 if no valid day specification can be found.
699 616
 
700  
-.. method:: MonthMixin.get_next_day(date)
  617
+    .. method:: get_next_day(date)
701 618
 
702  
-    Returns a date object containing the next day after the date
703  
-    provided. Returns `None`` if mixed with a view that sets
704  
-    ``allow_future = False``, and the next day is in the future. If
705  
-    ``allow_empty = False``, returns the next day that contains
706  
-    data.
  619
+        Returns a date object containing the next day after the date provided.
  620
+        Returns `None`` if mixed with a view that sets ``allow_future = False``,
  621
+        and the next day is in the future. If ``allow_empty = False``, returns
  622
+        the next day that contains data.
707 623
 
708  
-.. method:: MonthMixin.get_prev_day(date)
  624
+    .. method:: get_prev_day(date)
709 625
 
710  
-    Returns a date object containing the previous day. If
711  
-    ``allow_empty = False``, returns the previous day that contained
712  
-    data.
  626
+        Returns a date object containing the previous day. If
  627
+        ``allow_empty = False``, returns the previous day that contained data.
713 628
 
714  
-WeekMixin
715  
-~~~~~~~~~
716 629
 .. class:: WeekMixin()
717 630
 
718  
-A mixin that can be used to retrieve and provide parsing information
719  
-for a week component of a date.
720  
-
721  
-**Attributes**
722  
-
723  
-.. attribute:: WeekMixin.week_format
  631
+    A mixin that can be used to retrieve and provide parsing information for a
  632
+    week component of a date.
724 633
 
725  
-    The strftime_ format to use when parsing the week. By default,
726  
-    this is ``'%U'``.
  634
+    .. attribute:: week_format
727 635
 
728  
-.. attribute:: WeekMixin.week
  636
+        The strftime_ format to use when parsing the week. By default, this is
  637
+        ``'%U'``.
729 638
 
730  
-    **Optional** The value for the week (as a string). By default,
731  
-    set to ``None``, which means the week will be determined using
732  
-    other means.
  639
+    .. attribute:: week
733 640
 
734  
-**Methods**
  641
+        **Optional** The value for the week (as a string). By default, set to
  642
+        ``None``, which means the week will be determined using other means.
735 643
 
736  
-.. method:: WeekMixin.get_week_format()
  644
+    .. method:: get_week_format()
737 645
 
738  
-    Returns the strftime_ format to use when parsing the week. Returns
739  
-    :attr:`WeekMixin.week_format` by default.
  646
+        Returns the strftime_ format to use when parsing the week. Returns
  647
+        :attr:`WeekMixin.week_format` by default.
740 648
 
741  
-.. method:: WeekMixin.get_week()
  649
+    .. method:: get_week()
742 650
 
743  
-    Returns the week for which this view will display data. Tries the
744  
-    following sources, in order:
  651
+        Returns the week for which this view will display data. Tries the
  652
+        following sources, in order:
745 653
 
746  
-        * The value of the :attr:`WeekMixin.week` attribute.
747  
-        * The value of the `week` argument captured in the URL pattern
748  
-        * The value of the `week` GET query argument.
  654
+            * The value of the :attr:`WeekMixin.week` attribute.
  655
+            * The value of the `week` argument captured in the URL pattern
  656
+            * The value of the `week` GET query argument.
749 657
 
750  
-    Raises a 404 if no valid week specification can be found.
  658
+        Raises a 404 if no valid week specification can be found.
751 659
 
752 660
 
753  
-DateMixin
754  
-~~~~~~~~~
755 661
 .. class:: DateMixin()
756 662
 
757  
-A mixin class providing common behavior for all date-based views.
  663
+    A mixin class providing common behavior for all date-based views.
758 664
 
759  
-**Attributes**
  665
+    .. attribute:: date_field
760 666
 
761  
-.. attribute:: BaseDateListView.date_field
  667
+        The name of the ``DateField`` or ``DateTimeField`` in the
  668
+        ``QuerySet``'s model that the date-based archive should use to
  669
+        determine the objects on the page.
762 670
 
763  
-    The name of the ``DateField`` or ``DateTimeField`` in the
764  
-    ``QuerySet``'s model that the date-based archive should use to
765  
-    determine the objects on the page.
  671
+    .. attribute:: allow_future
766 672
 
767  
-.. attribute:: BaseDateListView.allow_future
  673
+        A boolean specifying whether to include "future" objects on this page,
  674
+        where "future" means objects in which the field specified in
  675
+        ``date_field`` is greater than the current date/time. By default, this
  676
+        is ``False``.
768 677
 
769  
-    A boolean specifying whether to include "future" objects on this
770  
-    page, where "future" means objects in which the field specified in
771  
-    ``date_field`` is greater than the current date/time. By default,
772  
-    this is ``False``.
  678
+    .. method:: get_date_field()
773 679
 
774  
-**Methods**
  680
+        Returns the name of the field that contains the date data that this
  681
+        view will operate on. Returns :attr:`DateMixin.date_field` by default.
775 682
 
776  
-.. method:: BaseDateListView.get_date_field()
  683
+    .. method:: get_allow_future()
777 684
 
778  
-    Returns the name of the field that contains the date data that
779  
-    this view will operate on. Returns :attr:`DateMixin.date_field` by
780  
-    default.
  685
+        Determine whether to include "future" objects on this page, where
  686
+        "future" means objects in which the field specified in ``date_field``
  687
+        is greater than the current date/time. Returns
  688
+        :attr:`DateMixin.date_field` by default.
781 689
 
782  
-.. method:: BaseDateListView.get_allow_future()
783  
-
784  
-    Determine whether to include "future" objects on this page, where
785  
-    "future" means objects in which the field specified in
786  
-    ``date_field`` is greater than the current date/time. Returns
787  
-    :attr:`DateMixin.date_field` by default.
788  
-
789  
-BaseDateListView
790  
-~~~~~~~~~~~~~~~~
791 690
 .. class:: BaseDateListView()
792 691
 
793  
-A base class that provides common behavior for all date-based views.
794  
-There won't normally be a reason to instantiate
795  
-:class:`~django.views.generic.dates.BaseDateListView`; instantiate one of
796  
-the subclasses instead.
797  
-
798  
-While this view (and it's subclasses) are executing,
799  
-``self.object_list`` will contain the list of objects that the view is
800  
-operating upon, and ``self.date_list`` will contain the list of dates
801  
-for which data is available.
  692
+    A base class that provides common behavior for all date-based views. There
  693
+    won't normally be a reason to instantiate
  694
+    :class:`~django.views.generic.dates.BaseDateListView`; instantiate one of
  695
+    the subclasses instead.
802 696
 
803  
-**Mixins**
  697
+    While this view (and it's subclasses) are executing, ``self.object_list``
  698
+    will contain the list of objects that the view is operating upon, and
  699
+    ``self.date_list`` will contain the list of dates for which data is
  700
+    available.
804 701
 
805  
-    * :class:`~django.views.generic.dates.DateMixin`
806  
-    * :class:`~django.views.generic.list.MultipleObjectMixin`
  702
+    **Mixins**
807 703
 
808  
-**Attributes**
  704
+        * :class:`~django.views.generic.dates.DateMixin`
  705
+        * :class:`~django.views.generic.list.MultipleObjectMixin`
809 706
 
810  
-.. attribute:: BaseDateListView.allow_empty
  707
+    .. attribute:: allow_empty
811 708
 
812  
-    A boolean specifying whether to display the page if no objects are
813