mirror of https://github.com/django/django.git
Fixed #32408 -- Doc'd django.views.generic.detail.BaseDetailView.
This commit is contained in:
parent
50a5f8840f
commit
de4492fbb1
|
@ -582,7 +582,7 @@ views for displaying drilldown pages for date-based data.
|
|||
* :class:`django.views.generic.dates.MonthMixin`
|
||||
* :class:`django.views.generic.dates.DayMixin`
|
||||
* :class:`django.views.generic.dates.DateMixin`
|
||||
* ``django.views.generic.detail.BaseDetailView``
|
||||
* :class:`django.views.generic.detail.BaseDetailView`
|
||||
* :class:`django.views.generic.detail.SingleObjectMixin`
|
||||
* :class:`django.views.generic.base.View`
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ many projects they are typically the most commonly used views.
|
|||
|
||||
* :class:`django.views.generic.detail.SingleObjectTemplateResponseMixin`
|
||||
* :class:`django.views.generic.base.TemplateResponseMixin`
|
||||
* ``django.views.generic.detail.BaseDetailView``
|
||||
* :class:`django.views.generic.detail.BaseDetailView`
|
||||
* :class:`django.views.generic.detail.SingleObjectMixin`
|
||||
* :class:`django.views.generic.base.View`
|
||||
|
||||
|
@ -73,6 +73,26 @@ many projects they are typically the most commonly used views.
|
|||
<p>Published: {{ object.pub_date|date }}</p>
|
||||
<p>Date: {{ now|date }}</p>
|
||||
|
||||
.. class:: django.views.generic.detail.BaseDetailView
|
||||
|
||||
A base view for displaying a single object. It is not intended to be used
|
||||
directly, but rather as a parent class of the
|
||||
:class:`django.views.generic.detail.DetailView` or other views representing
|
||||
details of a single object.
|
||||
|
||||
**Ancestors (MRO)**
|
||||
|
||||
This view inherits methods and attributes from the following views:
|
||||
|
||||
* :class:`django.views.generic.detail.SingleObjectMixin`
|
||||
* :class:`django.views.generic.base.View`
|
||||
|
||||
**Methods**
|
||||
|
||||
.. method:: get(request, *args, **kwargs)
|
||||
|
||||
Adds ``object`` to the context.
|
||||
|
||||
``ListView``
|
||||
============
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ editing content:
|
|||
* :class:`django.views.generic.base.TemplateResponseMixin`
|
||||
* ``django.views.generic.edit.BaseDeleteView``
|
||||
* :class:`django.views.generic.edit.DeletionMixin`
|
||||
* ``django.views.generic.detail.BaseDetailView``
|
||||
* :class:`django.views.generic.detail.BaseDetailView`
|
||||
* :class:`django.views.generic.detail.SingleObjectMixin`
|
||||
* :class:`django.views.generic.base.View`
|
||||
|
||||
|
|
|
@ -636,7 +636,7 @@ To use it, we need to mix it into a ``TemplateView`` for example, and override
|
|||
Equally we could use our mixin with one of the generic views. We can make our
|
||||
own version of :class:`~django.views.generic.detail.DetailView` by mixing
|
||||
``JSONResponseMixin`` with the
|
||||
``django.views.generic.detail.BaseDetailView`` -- (the
|
||||
:class:`~django.views.generic.detail.BaseDetailView` -- (the
|
||||
:class:`~django.views.generic.detail.DetailView` before template
|
||||
rendering behavior has been mixed in)::
|
||||
|
||||
|
|
Loading…
Reference in New Issue