mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #26020 -- Normalized header stylings in docs.
This commit is contained in:
@@ -14,7 +14,7 @@ ancestor classes are documented under the section title of **Ancestors (MRO)**.
|
||||
MRO is an acronym for Method Resolution Order.
|
||||
|
||||
View
|
||||
----
|
||||
====
|
||||
|
||||
.. class:: django.views.generic.base.View
|
||||
|
||||
@@ -103,7 +103,7 @@ View
|
||||
list of the allowed HTTP method names for the view.
|
||||
|
||||
TemplateView
|
||||
------------
|
||||
============
|
||||
|
||||
.. class:: django.views.generic.base.TemplateView
|
||||
|
||||
@@ -155,7 +155,7 @@ TemplateView
|
||||
the keyword arguments captured from the URL pattern that served the view.
|
||||
|
||||
RedirectView
|
||||
------------
|
||||
============
|
||||
|
||||
.. class:: django.views.generic.base.RedirectView
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ documentation organized by the class which defines the behavior, see
|
||||
:doc:`Class-based views</ref/class-based-views/index>`
|
||||
|
||||
Simple generic views
|
||||
--------------------
|
||||
====================
|
||||
|
||||
View
|
||||
~~~~
|
||||
----
|
||||
.. class:: View()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -27,7 +27,7 @@ View
|
||||
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
||||
|
||||
TemplateView
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
.. class:: TemplateView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -49,7 +49,7 @@ TemplateView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
RedirectView
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
.. class:: RedirectView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -73,10 +73,10 @@ RedirectView
|
||||
* ``put()``
|
||||
|
||||
Detail Views
|
||||
------------
|
||||
============
|
||||
|
||||
DetailView
|
||||
~~~~~~~~~~
|
||||
----------
|
||||
.. class:: DetailView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -107,10 +107,10 @@ DetailView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
List Views
|
||||
----------
|
||||
==========
|
||||
|
||||
ListView
|
||||
~~~~~~~~
|
||||
--------
|
||||
.. class:: ListView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -143,10 +143,10 @@ ListView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
Editing views
|
||||
-------------
|
||||
=============
|
||||
|
||||
FormView
|
||||
~~~~~~~~
|
||||
--------
|
||||
.. class:: FormView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -176,7 +176,7 @@ FormView
|
||||
* :meth:`~django.views.generic.edit.ProcessFormView.put`
|
||||
|
||||
CreateView
|
||||
~~~~~~~~~~
|
||||
----------
|
||||
.. class:: CreateView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -218,7 +218,7 @@ CreateView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
UpdateView
|
||||
~~~~~~~~~~
|
||||
----------
|
||||
.. class:: UpdateView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -260,7 +260,7 @@ UpdateView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
DeleteView
|
||||
~~~~~~~~~~
|
||||
----------
|
||||
.. class:: DeleteView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -294,10 +294,10 @@ DeleteView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
Date-based views
|
||||
----------------
|
||||
================
|
||||
|
||||
ArchiveIndexView
|
||||
~~~~~~~~~~~~~~~~
|
||||
----------------
|
||||
.. class:: ArchiveIndexView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -335,7 +335,7 @@ ArchiveIndexView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
YearArchiveView
|
||||
~~~~~~~~~~~~~~~
|
||||
---------------
|
||||
.. class:: YearArchiveView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -376,7 +376,7 @@ YearArchiveView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
MonthArchiveView
|
||||
~~~~~~~~~~~~~~~~
|
||||
----------------
|
||||
.. class:: MonthArchiveView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -420,7 +420,7 @@ MonthArchiveView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
WeekArchiveView
|
||||
~~~~~~~~~~~~~~~
|
||||
---------------
|
||||
.. class:: WeekArchiveView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -462,7 +462,7 @@ WeekArchiveView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
DayArchiveView
|
||||
~~~~~~~~~~~~~~
|
||||
--------------
|
||||
.. class:: DayArchiveView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -510,7 +510,7 @@ DayArchiveView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
TodayArchiveView
|
||||
~~~~~~~~~~~~~~~~
|
||||
----------------
|
||||
.. class:: TodayArchiveView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
@@ -558,7 +558,7 @@ TodayArchiveView
|
||||
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
||||
|
||||
DateDetailView
|
||||
~~~~~~~~~~~~~~
|
||||
--------------
|
||||
.. class:: DateDetailView()
|
||||
|
||||
**Attributes** (with optional accessor):
|
||||
|
||||
@@ -23,7 +23,7 @@ views for displaying drilldown pages for date-based data.
|
||||
return reverse('article-detail', kwargs={'pk': self.pk})
|
||||
|
||||
ArchiveIndexView
|
||||
----------------
|
||||
================
|
||||
|
||||
.. class:: ArchiveIndexView
|
||||
|
||||
@@ -87,7 +87,7 @@ ArchiveIndexView
|
||||
This will output all articles.
|
||||
|
||||
YearArchiveView
|
||||
---------------
|
||||
===============
|
||||
|
||||
.. class:: YearArchiveView
|
||||
|
||||
@@ -192,7 +192,7 @@ YearArchiveView
|
||||
</div>
|
||||
|
||||
MonthArchiveView
|
||||
----------------
|
||||
================
|
||||
|
||||
.. class:: MonthArchiveView
|
||||
|
||||
@@ -289,7 +289,7 @@ MonthArchiveView
|
||||
</p>
|
||||
|
||||
WeekArchiveView
|
||||
---------------
|
||||
===============
|
||||
|
||||
.. class:: WeekArchiveView
|
||||
|
||||
@@ -392,7 +392,7 @@ WeekArchiveView
|
||||
filter ``'%U'`` outputs the number of seconds since the Unix epoch.
|
||||
|
||||
DayArchiveView
|
||||
--------------
|
||||
==============
|
||||
|
||||
.. class:: DayArchiveView
|
||||
|
||||
@@ -494,7 +494,7 @@ DayArchiveView
|
||||
</p>
|
||||
|
||||
TodayArchiveView
|
||||
----------------
|
||||
================
|
||||
|
||||
.. class:: TodayArchiveView
|
||||
|
||||
@@ -551,7 +551,7 @@ TodayArchiveView
|
||||
name of the new template.
|
||||
|
||||
DateDetailView
|
||||
--------------
|
||||
==============
|
||||
|
||||
.. class:: DateDetailView
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ The two following generic class-based views are designed to display data. On
|
||||
many projects they are typically the most commonly used views.
|
||||
|
||||
DetailView
|
||||
----------
|
||||
==========
|
||||
|
||||
.. class:: django.views.generic.detail.DetailView
|
||||
|
||||
@@ -73,7 +73,7 @@ DetailView
|
||||
<p>Date: {{ now|date }}</p>
|
||||
|
||||
ListView
|
||||
--------
|
||||
========
|
||||
|
||||
.. class:: django.views.generic.list.ListView
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ editing content:
|
||||
return reverse('author-detail', kwargs={'pk': self.pk})
|
||||
|
||||
FormView
|
||||
--------
|
||||
========
|
||||
|
||||
.. class:: django.views.generic.edit.FormView
|
||||
|
||||
@@ -81,7 +81,7 @@ FormView
|
||||
|
||||
|
||||
CreateView
|
||||
----------
|
||||
==========
|
||||
|
||||
.. class:: django.views.generic.edit.CreateView
|
||||
|
||||
@@ -136,7 +136,7 @@ CreateView
|
||||
</form>
|
||||
|
||||
UpdateView
|
||||
----------
|
||||
==========
|
||||
|
||||
.. class:: django.views.generic.edit.UpdateView
|
||||
|
||||
@@ -193,7 +193,7 @@ UpdateView
|
||||
</form>
|
||||
|
||||
DeleteView
|
||||
----------
|
||||
==========
|
||||
|
||||
.. class:: django.views.generic.edit.DeleteView
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Class-based views API reference. For introductory material, see the
|
||||
flattened-index
|
||||
|
||||
Specification
|
||||
-------------
|
||||
=============
|
||||
|
||||
Each request served by a class-based view has an independent state; therefore,
|
||||
it is safe to store state variables on the instance (i.e., ``self.foo = 3`` is
|
||||
@@ -44,7 +44,7 @@ previous example, this means that every request on ``MyView`` is able to use
|
||||
the class (return ``True`` on a ``hasattr`` check).
|
||||
|
||||
Base vs Generic views
|
||||
---------------------
|
||||
=====================
|
||||
|
||||
Base class-based views can be thought of as *parent* views, which can be
|
||||
used by themselves or inherited from. They may not provide all the
|
||||
|
||||
@@ -11,7 +11,7 @@ Date-based mixins
|
||||
characters from the :ttag:`now` template tag as they are not compatible.
|
||||
|
||||
YearMixin
|
||||
---------
|
||||
=========
|
||||
|
||||
.. class:: YearMixin
|
||||
|
||||
@@ -63,7 +63,7 @@ YearMixin
|
||||
:attr:`~DateMixin.allow_future`.
|
||||
|
||||
MonthMixin
|
||||
----------
|
||||
==========
|
||||
|
||||
.. class:: MonthMixin
|
||||
|
||||
@@ -115,7 +115,7 @@ MonthMixin
|
||||
:attr:`~DateMixin.allow_future`.
|
||||
|
||||
DayMixin
|
||||
--------
|
||||
========
|
||||
|
||||
.. class:: DayMixin
|
||||
|
||||
@@ -167,7 +167,7 @@ DayMixin
|
||||
:attr:`~DateMixin.allow_future`.
|
||||
|
||||
WeekMixin
|
||||
---------
|
||||
=========
|
||||
|
||||
.. class:: WeekMixin
|
||||
|
||||
@@ -220,7 +220,7 @@ WeekMixin
|
||||
:attr:`~DateMixin.allow_future`.
|
||||
|
||||
DateMixin
|
||||
---------
|
||||
=========
|
||||
|
||||
.. class:: DateMixin
|
||||
|
||||
@@ -266,7 +266,7 @@ DateMixin
|
||||
:attr:`~DateMixin.allow_future` by default.
|
||||
|
||||
BaseDateListView
|
||||
----------------
|
||||
================
|
||||
|
||||
.. class:: BaseDateListView
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ The following mixins are used to construct Django's editing views:
|
||||
the documentation on :doc:`/ref/class-based-views/generic-editing`.
|
||||
|
||||
FormMixin
|
||||
---------
|
||||
=========
|
||||
|
||||
.. class:: django.views.generic.edit.FormMixin
|
||||
|
||||
@@ -95,7 +95,7 @@ FormMixin
|
||||
name 'form'.
|
||||
|
||||
ModelFormMixin
|
||||
--------------
|
||||
==============
|
||||
|
||||
.. class:: django.views.generic.edit.ModelFormMixin
|
||||
|
||||
@@ -181,7 +181,7 @@ ModelFormMixin
|
||||
|
||||
|
||||
ProcessFormView
|
||||
---------------
|
||||
===============
|
||||
|
||||
.. class:: django.views.generic.edit.ProcessFormView
|
||||
|
||||
@@ -221,7 +221,7 @@ ProcessFormView
|
||||
|
||||
|
||||
DeletionMixin
|
||||
-------------
|
||||
=============
|
||||
|
||||
.. class:: django.views.generic.edit.DeletionMixin
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Multiple object mixins
|
||||
======================
|
||||
|
||||
MultipleObjectMixin
|
||||
-------------------
|
||||
===================
|
||||
|
||||
.. class:: django.views.generic.list.MultipleObjectMixin
|
||||
|
||||
@@ -193,7 +193,7 @@ MultipleObjectMixin
|
||||
|
||||
|
||||
MultipleObjectTemplateResponseMixin
|
||||
-----------------------------------
|
||||
===================================
|
||||
|
||||
.. class:: django.views.generic.list.MultipleObjectTemplateResponseMixin
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Simple mixins
|
||||
=============
|
||||
|
||||
ContextMixin
|
||||
------------
|
||||
============
|
||||
|
||||
.. class:: django.views.generic.base.ContextMixin
|
||||
|
||||
@@ -32,7 +32,7 @@ ContextMixin
|
||||
<alters-data-description>`.
|
||||
|
||||
TemplateResponseMixin
|
||||
---------------------
|
||||
=====================
|
||||
|
||||
.. class:: django.views.generic.base.TemplateResponseMixin
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Single object mixins
|
||||
====================
|
||||
|
||||
SingleObjectMixin
|
||||
-----------------
|
||||
=================
|
||||
|
||||
.. class:: django.views.generic.detail.SingleObjectMixin
|
||||
|
||||
@@ -132,7 +132,7 @@ SingleObjectMixin
|
||||
|
||||
|
||||
SingleObjectTemplateResponseMixin
|
||||
---------------------------------
|
||||
=================================
|
||||
|
||||
.. class:: django.views.generic.detail.SingleObjectTemplateResponseMixin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user