From 08f73a9e4f3c97a7133700e7bb34940ddea1534c Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Thu, 7 Jun 2012 17:36:56 +0200 Subject: [PATCH] moved mention of the Base* views out of the generic CBV references and into a note section at the bottom --- docs/ref/class-based-views.txt | 79 ++-------------------------------- 1 file changed, 4 insertions(+), 75 deletions(-) diff --git a/docs/ref/class-based-views.txt b/docs/ref/class-based-views.txt index b13df53958f1a..9becc367e3e5a 100644 --- a/docs/ref/class-based-views.txt +++ b/docs/ref/class-based-views.txt @@ -301,6 +301,7 @@ Most generic views require the ``queryset`` key, which is a ``QuerySet`` instance; see :doc:`/topics/db/queries` for more information about ``QuerySet`` objects. + Detail views ------------ @@ -308,7 +309,6 @@ Detail views DetailView ~~~~~~~~~~ -.. class:: BaseDetailView() .. class:: DetailView() A page representing an individual object. @@ -316,11 +316,6 @@ DetailView While this view is executing, ``self.object`` will contain the object that the view is operating upon. - :class:`~django.views.generic.base.BaseDetailView` implements the same - behavior as :class:`~django.views.generic.base.DetailView`, but doesn't - include the - :class:`~django.views.generic.detail.SingleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.detail.SingleObjectMixin` @@ -333,7 +328,6 @@ List views ListView ~~~~~~~~ -.. class:: BaseListView() .. class:: ListView() A page representing a list of objects. @@ -342,11 +336,6 @@ ListView objects (usually, but not necessarily a queryset) that the view is operating upon. - :class:`~django.views.generic.list.BaseListView` implements the same - behavior as :class:`~django.views.generic.list.ListView`, but doesn't - include the - :class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.list.MultipleObjectMixin` @@ -360,16 +349,11 @@ Editing views FormView ~~~~~~~~ -.. class:: BaseFormView() .. class:: FormView() A view that displays a form. On error, redisplays the form with validation errors; on success, redirects to a new URL. - :class:`~django.views.generic.edit.BaseFormView` implements the same - behavior as :class:`~django.views.generic.edit.FormView`, but doesn't - include the :class:`~django.views.generic.base.TemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.edit.FormMixin` @@ -377,16 +361,11 @@ FormView CreateView ~~~~~~~~~~ -.. class:: BaseCreateView() .. class:: CreateView() A view that displays a form for creating an object, redisplaying the form with validation errors (if there are any) and saving the object. - :class:`~django.views.generic.edit.BaseCreateView` implements the same - behavior as :class:`~django.views.generic.edit.CreateView`, but doesn't - include the :class:`~django.views.generic.base.TemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.edit.ModelFormMixin` @@ -394,7 +373,6 @@ CreateView UpdateView ~~~~~~~~~~ -.. class:: BaseUpdateView() .. class:: UpdateView() A view that displays a form for editing an existing object, redisplaying @@ -402,10 +380,6 @@ UpdateView the object. This uses a form automatically generated from the object's model class (unless a form class is manually specified). - :class:`~django.views.generic.edit.BaseUpdateView` implements the same - behavior as :class:`~django.views.generic.edit.UpdateView`, but doesn't - include the :class:`~django.views.generic.base.TemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.edit.ModelFormMixin` @@ -413,7 +387,6 @@ UpdateView DeleteView ~~~~~~~~~~ -.. class:: BaseDeleteView() .. class:: DeleteView() A view that displays a confirmation page and deletes an existing object. @@ -421,10 +394,6 @@ DeleteView this view is fetched via ``GET``, it will display a confirmation page that should contain a form that POSTs to the same URL. - :class:`~django.views.generic.edit.BaseDeleteView` implements the same - behavior as :class:`~django.views.generic.edit.DeleteView`, but doesn't - include the :class:`~django.views.generic.base.TemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.edit.DeletionMixin` @@ -445,18 +414,12 @@ are views for displaying drilldown pages for date-based data. ArchiveIndexView ~~~~~~~~~~~~~~~~ -.. class:: BaseArchiveIndexView() .. class:: ArchiveIndexView() A top-level index page showing the "latest" objects, by date. Objects with a date in the *future* are not included unless you set ``allow_future`` to ``True``. - :class:`~django.views.generic.dates.BaseArchiveIndexView` implements the - same behavior as :class:`~django.views.generic.dates.ArchiveIndexView`, but - doesn't include the - :class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.dates.BaseDateListView` @@ -469,18 +432,12 @@ ArchiveIndexView YearArchiveView ~~~~~~~~~~~~~~~ -.. class:: BaseYearArchiveView() .. class:: YearArchiveView() A yearly archive page showing all available months in a given year. Objects with a date in the *future* are not displayed unless you set ``allow_future`` to ``True``. - :class:`~django.views.generic.dates.BaseYearArchiveView` implements the - same behavior as :class:`~django.views.generic.dates.YearArchiveView`, but - doesn't include the - :class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.list.MultipleObjectTemplateResponseMixin` @@ -526,19 +483,12 @@ YearArchiveView MonthArchiveView ~~~~~~~~~~~~~~~~ -.. class:: BaseMonthArchiveView() .. class:: MonthArchiveView() A monthly archive page showing all objects in a given month. Objects with a date in the *future* are not displayed unless you set ``allow_future`` to ``True``. - :class:`~django.views.generic.dates.BaseMonthArchiveView` implements - the same behavior as - :class:`~django.views.generic.dates.MonthArchiveView`, but doesn't - include the - :class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.list.MultipleObjectTemplateResponseMixin` @@ -573,18 +523,12 @@ MonthArchiveView WeekArchiveView ~~~~~~~~~~~~~~~ -.. class:: BaseWeekArchiveView() .. class:: WeekArchiveView() A weekly archive page showing all objects in a given week. Objects with a date in the *future* are not displayed unless you set ``allow_future`` to ``True``. - :class:`~django.views.generic.dates.BaseWeekArchiveView` implements the - same behavior as :class:`~django.views.generic.dates.WeekArchiveView`, but - doesn't include the - :class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.list.MultipleObjectTemplateResponseMixin` @@ -616,18 +560,12 @@ WeekArchiveView DayArchiveView ~~~~~~~~~~~~~~ -.. class:: BaseDayArchiveView() .. class:: DayArchiveView() A day archive page showing all objects in a given day. Days in the future throw a 404 error, regardless of whether any objects exist for future days, unless you set ``allow_future`` to ``True``. - :class:`~django.views.generic.dates.BaseDayArchiveView` implements the same - behavior as :class:`~django.views.generic.dates.DayArchiveView`, but - doesn't include the - :class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.list.MultipleObjectTemplateResponseMixin` @@ -665,18 +603,12 @@ DayArchiveView TodayArchiveView ~~~~~~~~~~~~~~~~ -.. class:: BaseTodayArchiveView() .. class:: TodayArchiveView() A day archive page showing all objects for *today*. This is exactly the same as :class:`django.views.generic.dates.DayArchiveView`, except today's date is used instead of the ``year``/``month``/``day`` arguments. - :class:`~django.views.generic.dates.BaseTodayArchiveView` implements the - same behavior as :class:`~django.views.generic.dates.TodayArchiveView`, but - doesn't include the - :class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.list.MultipleObjectTemplateResponseMixin` @@ -684,18 +616,12 @@ TodayArchiveView DateDetailView ~~~~~~~~~~~~~~ -.. class:: BaseDateDetailView() .. class:: DateDetailView() A page representing an individual object. If the object has a date value in the future, the view will throw a 404 error by default, unless you set ``allow_future`` to ``True``. - :class:`~django.views.generic.dates.BaseDateDetailView` implements the same - behavior as :class:`~django.views.generic.dates.DateDetailView`, but - doesn't include the - :class:`~django.views.generic.detail.SingleObjectTemplateResponseMixin`. - **Mixins** * :class:`django.views.generic.detail.SingleObjectTemplateResponseMixin` @@ -704,3 +630,6 @@ DateDetailView * :class:`django.views.generic.dates.YearMixin` * :class:`django.views.generic.dates.MonthMixin` * :class:`django.views.generic.dates.DayMixin` + +.. note:: All of the generic views listed above have matching Base* views that only + differ in that the they do not include the :class:`~django.views.generic.detail.SingleObjectTemplateResponseMixin`.