1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #26124 -- Added missing code formatting to docs headers.

This commit is contained in:
rowanv
2016-01-24 22:26:11 +01:00
committed by Tim Graham
parent 8bf8d0e0ec
commit a6ef025dfb
93 changed files with 1658 additions and 1625 deletions

View File

@@ -13,8 +13,8 @@ views or various mixins. Because this inheritance chain is very important, the
ancestor classes are documented under the section title of **Ancestors (MRO)**.
MRO is an acronym for Method Resolution Order.
View
====
``View``
========
.. class:: django.views.generic.base.View
@@ -102,8 +102,8 @@ View
Handles responding to requests for the OPTIONS HTTP verb. Returns a
list of the allowed HTTP method names for the view.
TemplateView
============
``TemplateView``
================
.. class:: django.views.generic.base.TemplateView
@@ -154,8 +154,8 @@ TemplateView
* Populated (through :class:`~django.views.generic.base.ContextMixin`) with
the keyword arguments captured from the URL pattern that served the view.
RedirectView
============
``RedirectView``
================
.. class:: django.views.generic.base.RedirectView

View File

@@ -11,8 +11,9 @@ documentation organized by the class which defines the behavior, see
Simple generic views
====================
View
----
``View``
--------
.. class:: View()
**Attributes** (with optional accessor):
@@ -26,8 +27,9 @@ View
* ``head()``
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
TemplateView
------------
``TemplateView``
----------------
.. class:: TemplateView()
**Attributes** (with optional accessor):
@@ -48,8 +50,9 @@ TemplateView
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
RedirectView
------------
``RedirectView``
----------------
.. class:: RedirectView()
**Attributes** (with optional accessor):
@@ -75,8 +78,9 @@ RedirectView
Detail Views
============
DetailView
----------
``DetailView``
--------------
.. class:: DetailView()
**Attributes** (with optional accessor):
@@ -109,8 +113,9 @@ DetailView
List Views
==========
ListView
--------
``ListView``
------------
.. class:: ListView()
**Attributes** (with optional accessor):
@@ -145,8 +150,9 @@ ListView
Editing views
=============
FormView
--------
``FormView``
------------
.. class:: FormView()
**Attributes** (with optional accessor):
@@ -175,8 +181,9 @@ FormView
* :meth:`~django.views.generic.edit.ProcessFormView.post`
* :meth:`~django.views.generic.edit.ProcessFormView.put`
CreateView
----------
``CreateView``
--------------
.. class:: CreateView()
**Attributes** (with optional accessor):
@@ -217,8 +224,9 @@ CreateView
* ``put()``
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
UpdateView
----------
``UpdateView``
--------------
.. class:: UpdateView()
**Attributes** (with optional accessor):
@@ -259,8 +267,9 @@ UpdateView
* ``put()``
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
DeleteView
----------
``DeleteView``
--------------
.. class:: DeleteView()
**Attributes** (with optional accessor):
@@ -296,8 +305,9 @@ DeleteView
Date-based views
================
ArchiveIndexView
----------------
``ArchiveIndexView``
--------------------
.. class:: ArchiveIndexView()
**Attributes** (with optional accessor):
@@ -334,8 +344,9 @@ ArchiveIndexView
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
YearArchiveView
---------------
``YearArchiveView``
-------------------
.. class:: YearArchiveView()
**Attributes** (with optional accessor):
@@ -375,8 +386,9 @@ YearArchiveView
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
MonthArchiveView
----------------
``MonthArchiveView``
--------------------
.. class:: MonthArchiveView()
**Attributes** (with optional accessor):
@@ -419,8 +431,9 @@ MonthArchiveView
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
WeekArchiveView
---------------
``WeekArchiveView``
-------------------
.. class:: WeekArchiveView()
**Attributes** (with optional accessor):
@@ -461,8 +474,9 @@ WeekArchiveView
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
DayArchiveView
--------------
``DayArchiveView``
------------------
.. class:: DayArchiveView()
**Attributes** (with optional accessor):
@@ -509,8 +523,9 @@ DayArchiveView
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
TodayArchiveView
----------------
``TodayArchiveView``
--------------------
.. class:: TodayArchiveView()
**Attributes** (with optional accessor):
@@ -557,8 +572,9 @@ TodayArchiveView
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
DateDetailView
--------------
``DateDetailView``
------------------
.. class:: DateDetailView()
**Attributes** (with optional accessor):

View File

@@ -22,8 +22,8 @@ views for displaying drilldown pages for date-based data.
def get_absolute_url(self):
return reverse('article-detail', kwargs={'pk': self.pk})
ArchiveIndexView
================
``ArchiveIndexView``
====================
.. class:: ArchiveIndexView
@@ -86,8 +86,8 @@ ArchiveIndexView
This will output all articles.
YearArchiveView
===============
``YearArchiveView``
===================
.. class:: YearArchiveView
@@ -191,8 +191,8 @@ YearArchiveView
{% endfor %}
</div>
MonthArchiveView
================
``MonthArchiveView``
====================
.. class:: MonthArchiveView
@@ -288,8 +288,8 @@ MonthArchiveView
{% endif %}
</p>
WeekArchiveView
===============
``WeekArchiveView``
===================
.. class:: WeekArchiveView
@@ -391,8 +391,8 @@ WeekArchiveView
output format that supports the US based week system. The :tfilter:`date`
filter ``'%U'`` outputs the number of seconds since the Unix epoch.
DayArchiveView
==============
``DayArchiveView``
==================
.. class:: DayArchiveView
@@ -493,8 +493,8 @@ DayArchiveView
{% endif %}
</p>
TodayArchiveView
================
``TodayArchiveView``
====================
.. class:: TodayArchiveView
@@ -550,8 +550,8 @@ TodayArchiveView
a different template, set the ``template_name`` attribute to be the
name of the new template.
DateDetailView
==============
``DateDetailView``
==================
.. class:: DateDetailView

View File

@@ -5,8 +5,8 @@ Generic display views
The two following generic class-based views are designed to display data. On
many projects they are typically the most commonly used views.
DetailView
==========
``DetailView``
==============
.. class:: django.views.generic.detail.DetailView
@@ -72,8 +72,8 @@ DetailView
<p>Published: {{ object.pub_date|date }}</p>
<p>Date: {{ now|date }}</p>
ListView
========
``ListView``
============
.. class:: django.views.generic.list.ListView

View File

@@ -24,8 +24,8 @@ editing content:
def get_absolute_url(self):
return reverse('author-detail', kwargs={'pk': self.pk})
FormView
========
``FormView``
============
.. class:: django.views.generic.edit.FormView
@@ -80,8 +80,8 @@ FormView
</form>
CreateView
==========
``CreateView``
==============
.. class:: django.views.generic.edit.CreateView
@@ -135,8 +135,8 @@ CreateView
<input type="submit" value="Create" />
</form>
UpdateView
==========
``UpdateView``
==============
.. class:: django.views.generic.edit.UpdateView
@@ -192,8 +192,8 @@ UpdateView
<input type="submit" value="Update" />
</form>
DeleteView
==========
``DeleteView``
==============
.. class:: django.views.generic.edit.DeleteView

View File

@@ -10,8 +10,8 @@ Date-based mixins
:func:`~time.strftime` format characters. Do not try to use the format
characters from the :ttag:`now` template tag as they are not compatible.
YearMixin
=========
``YearMixin``
=============
.. class:: YearMixin
@@ -62,8 +62,8 @@ YearMixin
:attr:`~BaseDateListView.allow_empty` and
:attr:`~DateMixin.allow_future`.
MonthMixin
==========
``MonthMixin``
==============
.. class:: MonthMixin
@@ -114,8 +114,8 @@ MonthMixin
:attr:`~BaseDateListView.allow_empty` and
:attr:`~DateMixin.allow_future`.
DayMixin
========
``DayMixin``
============
.. class:: DayMixin
@@ -166,8 +166,8 @@ DayMixin
:attr:`~BaseDateListView.allow_empty` and
:attr:`~DateMixin.allow_future`.
WeekMixin
=========
``WeekMixin``
=============
.. class:: WeekMixin
@@ -219,8 +219,8 @@ WeekMixin
:attr:`~BaseDateListView.allow_empty` and
:attr:`~DateMixin.allow_future`.
DateMixin
=========
``DateMixin``
=============
.. class:: DateMixin
@@ -265,8 +265,8 @@ DateMixin
is greater than the current date/time. Returns
:attr:`~DateMixin.allow_future` by default.
BaseDateListView
================
``BaseDateListView``
====================
.. class:: BaseDateListView

View File

@@ -14,8 +14,8 @@ The following mixins are used to construct Django's editing views:
Examples of how these are combined into editing views can be found at
the documentation on :doc:`/ref/class-based-views/generic-editing`.
FormMixin
=========
``FormMixin``
=============
.. class:: django.views.generic.edit.FormMixin
@@ -94,8 +94,8 @@ FormMixin
Calls :meth:`get_form` and adds the result to the context data with the
name 'form'.
ModelFormMixin
==============
``ModelFormMixin``
==================
.. class:: django.views.generic.edit.ModelFormMixin
@@ -180,8 +180,8 @@ ModelFormMixin
Renders a response, providing the invalid form as context.
ProcessFormView
===============
``ProcessFormView``
===================
.. class:: django.views.generic.edit.ProcessFormView
@@ -220,8 +220,8 @@ ProcessFormView
through to :meth:`post`.
DeletionMixin
=============
``DeletionMixin``
=================
.. class:: django.views.generic.edit.DeletionMixin

View File

@@ -2,8 +2,8 @@
Multiple object mixins
======================
MultipleObjectMixin
===================
``MultipleObjectMixin``
=======================
.. class:: django.views.generic.list.MultipleObjectMixin
@@ -192,8 +192,8 @@ MultipleObjectMixin
this context variable will be ``None``.
MultipleObjectTemplateResponseMixin
===================================
``MultipleObjectTemplateResponseMixin``
=======================================
.. class:: django.views.generic.list.MultipleObjectTemplateResponseMixin

View File

@@ -2,8 +2,8 @@
Simple mixins
=============
ContextMixin
============
``ContextMixin``
================
.. class:: django.views.generic.base.ContextMixin
@@ -31,8 +31,8 @@ ContextMixin
the documentation on :ref:`rendering a template context
<alters-data-description>`.
TemplateResponseMixin
=====================
``TemplateResponseMixin``
=========================
.. class:: django.views.generic.base.TemplateResponseMixin

View File

@@ -2,8 +2,8 @@
Single object mixins
====================
SingleObjectMixin
=================
``SingleObjectMixin``
=====================
.. class:: django.views.generic.detail.SingleObjectMixin
@@ -131,8 +131,8 @@ SingleObjectMixin
default this simply returns the value of :attr:`slug_field`.
SingleObjectTemplateResponseMixin
=================================
``SingleObjectTemplateResponseMixin``
=====================================
.. class:: django.views.generic.detail.SingleObjectTemplateResponseMixin