2012-09-01 21:20:38 +08:00
|
|
|
===========================================
|
|
|
|
Class-based generic views - flattened index
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
This index provides an alternate organization of the reference documentation
|
|
|
|
for class-based views. For each view, the effective attributes and methods from
|
|
|
|
the class tree are represented under that view. For the reference
|
|
|
|
documentation organized by the class which defines the behavior, see
|
2017-01-03 23:22:56 +08:00
|
|
|
:doc:`Class-based views</ref/class-based-views/index>`.
|
|
|
|
|
|
|
|
.. seealso::
|
|
|
|
|
|
|
|
`Classy Class-Based Views <https://ccbv.co.uk/>`_ provides a nice interface
|
|
|
|
to navigate the class hierarchy of the built-in class-based views.
|
2012-09-01 21:20:38 +08:00
|
|
|
|
|
|
|
Simple generic views
|
2016-01-03 18:56:22 +08:00
|
|
|
====================
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``View``
|
|
|
|
--------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: View()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``TemplateView``
|
|
|
|
----------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: TemplateView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
|
|
|
* :meth:`~django.views.generic.base.ContextMixin.get_context_data`
|
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``RedirectView``
|
|
|
|
----------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: RedirectView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
2014-02-21 22:07:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.RedirectView.pattern_name`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.RedirectView.permanent`
|
|
|
|
* :attr:`~django.views.generic.base.RedirectView.query_string`
|
2014-02-21 22:07:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.RedirectView.url` [:meth:`~django.views.generic.base.RedirectView.get_redirect_url`]
|
2012-09-01 21:20:38 +08:00
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``delete()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``options()``
|
|
|
|
* ``post()``
|
|
|
|
* ``put()``
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
|
|
|
Detail Views
|
2016-01-03 18:56:22 +08:00
|
|
|
============
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``DetailView``
|
|
|
|
--------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: DetailView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.context_object_name` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_context_object_name`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
2020-06-01 13:48:53 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.query_pk_and_slug`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_url_kwarg`
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_field`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_object`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
|
|
|
List Views
|
2016-01-03 18:56:22 +08:00
|
|
|
==========
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``ListView``
|
|
|
|
------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: ListView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.allow_empty` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_allow_empty`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.context_object_name` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_context_object_name`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.model`
|
2014-05-20 05:27:09 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.ordering` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_ordering`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_by` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_by`]
|
2012-11-21 11:45:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_orphans` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_orphans`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginator_class`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.queryset` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
|
|
|
* :meth:`~django.views.generic.list.BaseListView.get`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_paginator`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
|
|
|
Editing views
|
2016-01-03 18:56:22 +08:00
|
|
|
=============
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``FormView``
|
|
|
|
------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: FormView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.form_class` [:meth:`~django.views.generic.edit.FormMixin.get_form_class`]
|
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
2013-06-25 19:50:43 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.prefix` [:meth:`~django.views.generic.edit.FormMixin.get_prefix`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.success_url` [:meth:`~django.views.generic.edit.FormMixin.get_success_url`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.form_invalid`
|
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.form_valid`
|
|
|
|
* :meth:`~django.views.generic.edit.ProcessFormView.get`
|
2015-04-15 04:50:36 +08:00
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.get_context_data`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.get_form`
|
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.get_form_kwargs`
|
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
2013-03-29 19:57:07 +08:00
|
|
|
* :meth:`~django.views.generic.edit.ProcessFormView.post`
|
|
|
|
* :meth:`~django.views.generic.edit.ProcessFormView.put`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``CreateView``
|
|
|
|
--------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: CreateView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.context_object_name` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_context_object_name`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2013-06-24 05:43:09 +08:00
|
|
|
* :attr:`~django.views.generic.edit.ModelFormMixin.fields`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.form_class` [:meth:`~django.views.generic.edit.ModelFormMixin.get_form_class`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
2013-06-25 19:50:43 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.prefix` [:meth:`~django.views.generic.edit.FormMixin.get_prefix`]
|
2020-06-01 13:48:53 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.query_pk_and_slug`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_url_kwarg`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.success_url` [:meth:`~django.views.generic.edit.ModelFormMixin.get_success_url`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_field`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.form_invalid`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :meth:`~django.views.generic.edit.ModelFormMixin.form_valid`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.edit.ProcessFormView.get`
|
2015-04-15 04:50:36 +08:00
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.get_context_data`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.get_form`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :meth:`~django.views.generic.edit.ModelFormMixin.get_form_kwargs`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_object`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.edit.ProcessFormView.post`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``put()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``UpdateView``
|
|
|
|
--------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: UpdateView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.context_object_name` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_context_object_name`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2013-06-24 05:43:09 +08:00
|
|
|
* :attr:`~django.views.generic.edit.ModelFormMixin.fields`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.form_class` [:meth:`~django.views.generic.edit.ModelFormMixin.get_form_class`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
2013-06-25 19:50:43 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.prefix` [:meth:`~django.views.generic.edit.FormMixin.get_prefix`]
|
2020-06-01 13:48:53 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.query_pk_and_slug`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_url_kwarg`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :attr:`~django.views.generic.edit.FormMixin.success_url` [:meth:`~django.views.generic.edit.ModelFormMixin.get_success_url`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_field`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.form_invalid`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :meth:`~django.views.generic.edit.ModelFormMixin.form_valid`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.edit.ProcessFormView.get`
|
2015-04-15 04:50:36 +08:00
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.get_context_data`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.edit.FormMixin.get_form`
|
2015-04-21 21:50:41 +08:00
|
|
|
* :meth:`~django.views.generic.edit.ModelFormMixin.get_form_kwargs`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_object`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.edit.ProcessFormView.post`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``put()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``DeleteView``
|
|
|
|
--------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: DeleteView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.context_object_name` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_context_object_name`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
2020-06-01 13:48:53 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.query_pk_and_slug`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_url_kwarg`
|
|
|
|
* :attr:`~django.views.generic.edit.DeletionMixin.success_url` [:meth:`~django.views.generic.edit.DeletionMixin.get_success_url`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_field`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``delete()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_object`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``post()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
|
|
|
Date-based views
|
2016-01-03 18:56:22 +08:00
|
|
|
================
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``ArchiveIndexView``
|
|
|
|
--------------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: ArchiveIndexView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.allow_empty` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_allow_empty`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.allow_future` [:meth:`~django.views.generic.dates.DateMixin.get_allow_future`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.context_object_name` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_context_object_name`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.date_field` [:meth:`~django.views.generic.dates.DateMixin.get_date_field`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.model`
|
2014-05-20 05:27:09 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.ordering` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_ordering`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_by` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_by`]
|
2012-11-21 11:45:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_orphans` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_orphans`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginator_class`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.queryset` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_date_list`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_items`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_queryset`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_paginator`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``YearArchiveView``
|
|
|
|
-------------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: YearArchiveView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.allow_empty` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_allow_empty`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.allow_future` [:meth:`~django.views.generic.dates.DateMixin.get_allow_future`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.context_object_name` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_context_object_name`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.date_field` [:meth:`~django.views.generic.dates.DateMixin.get_date_field`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
2013-01-01 21:12:42 +08:00
|
|
|
* :attr:`~django.views.generic.dates.YearArchiveView.make_object_list` [:meth:`~django.views.generic.dates.YearArchiveView.get_make_object_list`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.model`
|
2014-05-20 05:27:09 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.ordering` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_ordering`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_by` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_by`]
|
2012-11-21 11:45:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_orphans` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_orphans`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginator_class`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.queryset` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year` [:meth:`~django.views.generic.dates.YearMixin.get_year`]
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year_format` [:meth:`~django.views.generic.dates.YearMixin.get_year_format`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_date_list`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_items`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_queryset`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_paginator`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``MonthArchiveView``
|
|
|
|
--------------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: MonthArchiveView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.allow_empty` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_allow_empty`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.allow_future` [:meth:`~django.views.generic.dates.DateMixin.get_allow_future`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.context_object_name` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_context_object_name`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.date_field` [:meth:`~django.views.generic.dates.DateMixin.get_date_field`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month` [:meth:`~django.views.generic.dates.MonthMixin.get_month`]
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month_format` [:meth:`~django.views.generic.dates.MonthMixin.get_month_format`]
|
2014-05-20 05:27:09 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.ordering` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_ordering`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_by` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_by`]
|
2012-11-21 11:45:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_orphans` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_orphans`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginator_class`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.queryset` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year` [:meth:`~django.views.generic.dates.YearMixin.get_year`]
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year_format` [:meth:`~django.views.generic.dates.YearMixin.get_year_format`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_date_list`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_items`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_queryset`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_next_month`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_paginator`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_previous_month`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``WeekArchiveView``
|
|
|
|
-------------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: WeekArchiveView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.allow_empty` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_allow_empty`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.allow_future` [:meth:`~django.views.generic.dates.DateMixin.get_allow_future`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.context_object_name` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_context_object_name`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.date_field` [:meth:`~django.views.generic.dates.DateMixin.get_date_field`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.model`
|
2014-05-20 05:27:09 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.ordering` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_ordering`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_by` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_by`]
|
2012-11-21 11:45:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_orphans` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_orphans`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginator_class`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.queryset` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
* :attr:`~django.views.generic.dates.WeekMixin.week` [:meth:`~django.views.generic.dates.WeekMixin.get_week`]
|
|
|
|
* :attr:`~django.views.generic.dates.WeekMixin.week_format` [:meth:`~django.views.generic.dates.WeekMixin.get_week_format`]
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year` [:meth:`~django.views.generic.dates.YearMixin.get_year`]
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year_format` [:meth:`~django.views.generic.dates.YearMixin.get_year_format`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_date_list`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_items`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_queryset`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_paginator`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``DayArchiveView``
|
|
|
|
------------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: DayArchiveView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.allow_empty` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_allow_empty`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.allow_future` [:meth:`~django.views.generic.dates.DateMixin.get_allow_future`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.context_object_name` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_context_object_name`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.date_field` [:meth:`~django.views.generic.dates.DateMixin.get_date_field`]
|
|
|
|
* :attr:`~django.views.generic.dates.DayMixin.day` [:meth:`~django.views.generic.dates.DayMixin.get_day`]
|
|
|
|
* :attr:`~django.views.generic.dates.DayMixin.day_format` [:meth:`~django.views.generic.dates.DayMixin.get_day_format`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month` [:meth:`~django.views.generic.dates.MonthMixin.get_month`]
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month_format` [:meth:`~django.views.generic.dates.MonthMixin.get_month_format`]
|
2014-05-20 05:27:09 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.ordering` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_ordering`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_by` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_by`]
|
2012-11-21 11:45:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_orphans` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_orphans`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginator_class`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.queryset` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year` [:meth:`~django.views.generic.dates.YearMixin.get_year`]
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year_format` [:meth:`~django.views.generic.dates.YearMixin.get_year_format`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_date_list`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_items`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_queryset`
|
|
|
|
* :meth:`~django.views.generic.dates.DayMixin.get_next_day`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_next_month`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_paginator`
|
|
|
|
* :meth:`~django.views.generic.dates.DayMixin.get_previous_day`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_previous_month`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``TodayArchiveView``
|
|
|
|
--------------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: TodayArchiveView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.allow_empty` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_allow_empty`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.allow_future` [:meth:`~django.views.generic.dates.DateMixin.get_allow_future`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.context_object_name` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_context_object_name`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.date_field` [:meth:`~django.views.generic.dates.DateMixin.get_date_field`]
|
|
|
|
* :attr:`~django.views.generic.dates.DayMixin.day` [:meth:`~django.views.generic.dates.DayMixin.get_day`]
|
|
|
|
* :attr:`~django.views.generic.dates.DayMixin.day_format` [:meth:`~django.views.generic.dates.DayMixin.get_day_format`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month` [:meth:`~django.views.generic.dates.MonthMixin.get_month`]
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month_format` [:meth:`~django.views.generic.dates.MonthMixin.get_month_format`]
|
2014-05-20 05:27:09 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.ordering` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_ordering`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_by` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_by`]
|
2012-11-21 11:45:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginate_orphans` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_paginate_orphans`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.paginator_class`
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectMixin.queryset` [:meth:`~django.views.generic.list.MultipleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year` [:meth:`~django.views.generic.dates.YearMixin.get_year`]
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year_format` [:meth:`~django.views.generic.dates.YearMixin.get_year_format`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_date_list`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_items`
|
|
|
|
* :meth:`~django.views.generic.dates.BaseDateListView.get_dated_queryset`
|
|
|
|
* :meth:`~django.views.generic.dates.DayMixin.get_next_day`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_next_month`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.get_paginator`
|
|
|
|
* :meth:`~django.views.generic.dates.DayMixin.get_previous_day`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_previous_month`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.list.MultipleObjectMixin.paginate_queryset`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|
2012-09-01 21:20:38 +08:00
|
|
|
|
2016-01-25 05:26:11 +08:00
|
|
|
``DateDetailView``
|
|
|
|
------------------
|
|
|
|
|
2012-09-01 21:20:38 +08:00
|
|
|
.. class:: DateDetailView()
|
|
|
|
|
|
|
|
**Attributes** (with optional accessor):
|
|
|
|
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.allow_future` [:meth:`~django.views.generic.dates.DateMixin.get_allow_future`]
|
2013-01-31 04:26:17 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.content_type`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.context_object_name` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_context_object_name`]
|
|
|
|
* :attr:`~django.views.generic.dates.DateMixin.date_field` [:meth:`~django.views.generic.dates.DateMixin.get_date_field`]
|
|
|
|
* :attr:`~django.views.generic.dates.DayMixin.day` [:meth:`~django.views.generic.dates.DayMixin.get_day`]
|
|
|
|
* :attr:`~django.views.generic.dates.DayMixin.day_format` [:meth:`~django.views.generic.dates.DayMixin.get_day_format`]
|
2017-07-06 22:34:54 +08:00
|
|
|
* :attr:`~django.views.generic.base.ContextMixin.extra_context`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month` [:meth:`~django.views.generic.dates.MonthMixin.get_month`]
|
|
|
|
* :attr:`~django.views.generic.dates.MonthMixin.month_format` [:meth:`~django.views.generic.dates.MonthMixin.get_month_format`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
2020-06-01 13:48:53 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.query_pk_and_slug`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
2013-03-29 19:57:07 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_url_kwarg`
|
2015-01-27 04:57:10 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_engine`
|
2012-09-01 21:20:38 +08:00
|
|
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_field`
|
|
|
|
* :attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year` [:meth:`~django.views.generic.dates.YearMixin.get_year`]
|
|
|
|
* :attr:`~django.views.generic.dates.YearMixin.year_format` [:meth:`~django.views.generic.dates.YearMixin.get_year_format`]
|
|
|
|
|
|
|
|
**Methods**
|
|
|
|
|
|
|
|
* :meth:`~django.views.generic.base.View.as_view`
|
|
|
|
* :meth:`~django.views.generic.base.View.dispatch`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``get()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_context_data`
|
|
|
|
* :meth:`~django.views.generic.dates.DayMixin.get_next_day`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_next_month`
|
|
|
|
* :meth:`~django.views.generic.detail.SingleObjectMixin.get_object`
|
|
|
|
* :meth:`~django.views.generic.dates.DayMixin.get_previous_day`
|
|
|
|
* :meth:`~django.views.generic.dates.MonthMixin.get_previous_month`
|
2013-01-01 21:12:42 +08:00
|
|
|
* ``head()``
|
2012-09-01 21:20:38 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.http_method_not_allowed`
|
|
|
|
* :meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`
|
2018-09-19 16:53:05 +08:00
|
|
|
* :meth:`~django.views.generic.base.View.setup`
|