Loading docs/ref/class-based-views/base.txt +22 −13 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ themselves or inherited from. They may not provide all the capabilities required for projects, in which case there are Mixins and Generic class-based views. View ---- .. class:: django.views.generic.base.View The master class-based base view. All other class-based views inherit from Loading Loading @@ -68,6 +71,9 @@ views. methods defined directly on the class are documented here, not methods defined on superclasses. TemplateView ------------ .. class:: django.views.generic.base.TemplateView Renders a given template, passing it a ``{{ params }}`` template variable, Loading Loading @@ -132,6 +138,9 @@ views. methods defined directly on the class are documented here, not methods defined on superclasses. RedirectView ------------ .. class:: django.views.generic.base.RedirectView Redirects to a given URL. Loading docs/ref/class-based-views/generic-date-based.txt +23 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ Generic date views Date-based generic views (in the module :mod:`django.views.generic.dates`) are views for displaying drilldown pages for date-based data. ArchiveIndexView ---------------- .. class:: django.views.generic.dates.ArchiveIndexView A top-level index page showing the "latest" objects, by date. Objects with Loading @@ -27,6 +30,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``context_object_name`` of ``latest``. * Uses a default ``template_name_suffix`` of ``_archive``. YearArchiveView --------------- .. class:: django.views.generic.dates.YearArchiveView A yearly archive page showing all available months in a given year. Objects Loading Loading @@ -86,6 +92,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_year``. MonthArchiveView ---------------- .. class:: django.views.generic.dates.MonthArchiveView A monthly archive page showing all objects in a given month. Objects with a Loading Loading @@ -134,6 +143,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_month``. WeekArchiveView --------------- .. class:: django.views.generic.dates.WeekArchiveView A weekly archive page showing all objects in a given week. Objects with a Loading Loading @@ -175,6 +187,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_week``. DayArchiveView -------------- .. class:: django.views.generic.dates.DayArchiveView A day archive page showing all objects in a given day. Days in the future Loading Loading @@ -225,6 +240,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_day``. TodayArchiveView ---------------- .. class:: django.views.generic.dates.TodayArchiveView A day archive page showing all objects for *today*. This is exactly the Loading @@ -246,6 +264,10 @@ are views for displaying drilldown pages for date-based data. * :class:`django.views.generic.dates.DateMixin` * :class:`django.views.generic.base.View` DateDetailView -------------- .. class:: django.views.generic.dates.DateDetailView A page representing an individual object. If the object has a date value in Loading docs/ref/class-based-views/generic-display.txt +8 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ 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 ---------- .. class:: django.views.generic.detail.DetailView While this view is executing, ``self.object`` will contain the object that Loading Loading @@ -57,6 +60,9 @@ many projects they are typically the most commonly used views. url(r'^(?P<slug>[-_\w]+)/$', ArticleDetailView.as_view(), name='article-detail'), ) ListView -------- .. class:: django.views.generic.list.ListView A page representing a list of objects. Loading docs/ref/class-based-views/generic-editing.txt +19 −8 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ editing content: def get_absolute_url(self): return reverse('author-detail', kwargs={'pk': self.pk}) FormView -------- .. class:: django.views.generic.edit.FormView A view that displays a form. On error, redisplays the form with validation Loading Loading @@ -69,6 +72,8 @@ editing content: form.send_email() return super(ContactView, self).form_valid(form) CreateView ---------- .. class:: django.views.generic.edit.CreateView Loading Loading @@ -107,6 +112,9 @@ editing content: class AuthorCreate(CreateView): model = Author UpdateView ---------- .. class:: django.views.generic.edit.UpdateView A view that displays a form for editing an existing object, redisplaying Loading Loading @@ -146,6 +154,9 @@ editing content: class AuthorUpdate(UpdateView): model = Author DeleteView ---------- .. class:: django.views.generic.edit.DeleteView A view that displays a confirmation page and deletes an existing object. Loading docs/ref/class-based-views/index.txt +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ Class-based views API reference. For introductory material, see :doc:`/topics/class-based-views/index`. .. toctree:: :maxdepth: 1 :maxdepth: 3 base generic-display Loading Loading
docs/ref/class-based-views/base.txt +22 −13 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ themselves or inherited from. They may not provide all the capabilities required for projects, in which case there are Mixins and Generic class-based views. View ---- .. class:: django.views.generic.base.View The master class-based base view. All other class-based views inherit from Loading Loading @@ -68,6 +71,9 @@ views. methods defined directly on the class are documented here, not methods defined on superclasses. TemplateView ------------ .. class:: django.views.generic.base.TemplateView Renders a given template, passing it a ``{{ params }}`` template variable, Loading Loading @@ -132,6 +138,9 @@ views. methods defined directly on the class are documented here, not methods defined on superclasses. RedirectView ------------ .. class:: django.views.generic.base.RedirectView Redirects to a given URL. Loading
docs/ref/class-based-views/generic-date-based.txt +23 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ Generic date views Date-based generic views (in the module :mod:`django.views.generic.dates`) are views for displaying drilldown pages for date-based data. ArchiveIndexView ---------------- .. class:: django.views.generic.dates.ArchiveIndexView A top-level index page showing the "latest" objects, by date. Objects with Loading @@ -27,6 +30,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``context_object_name`` of ``latest``. * Uses a default ``template_name_suffix`` of ``_archive``. YearArchiveView --------------- .. class:: django.views.generic.dates.YearArchiveView A yearly archive page showing all available months in a given year. Objects Loading Loading @@ -86,6 +92,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_year``. MonthArchiveView ---------------- .. class:: django.views.generic.dates.MonthArchiveView A monthly archive page showing all objects in a given month. Objects with a Loading Loading @@ -134,6 +143,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_month``. WeekArchiveView --------------- .. class:: django.views.generic.dates.WeekArchiveView A weekly archive page showing all objects in a given week. Objects with a Loading Loading @@ -175,6 +187,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_week``. DayArchiveView -------------- .. class:: django.views.generic.dates.DayArchiveView A day archive page showing all objects in a given day. Days in the future Loading Loading @@ -225,6 +240,9 @@ are views for displaying drilldown pages for date-based data. * Uses a default ``template_name_suffix`` of ``_archive_day``. TodayArchiveView ---------------- .. class:: django.views.generic.dates.TodayArchiveView A day archive page showing all objects for *today*. This is exactly the Loading @@ -246,6 +264,10 @@ are views for displaying drilldown pages for date-based data. * :class:`django.views.generic.dates.DateMixin` * :class:`django.views.generic.base.View` DateDetailView -------------- .. class:: django.views.generic.dates.DateDetailView A page representing an individual object. If the object has a date value in Loading
docs/ref/class-based-views/generic-display.txt +8 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ 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 ---------- .. class:: django.views.generic.detail.DetailView While this view is executing, ``self.object`` will contain the object that Loading Loading @@ -57,6 +60,9 @@ many projects they are typically the most commonly used views. url(r'^(?P<slug>[-_\w]+)/$', ArticleDetailView.as_view(), name='article-detail'), ) ListView -------- .. class:: django.views.generic.list.ListView A page representing a list of objects. Loading
docs/ref/class-based-views/generic-editing.txt +19 −8 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ editing content: def get_absolute_url(self): return reverse('author-detail', kwargs={'pk': self.pk}) FormView -------- .. class:: django.views.generic.edit.FormView A view that displays a form. On error, redisplays the form with validation Loading Loading @@ -69,6 +72,8 @@ editing content: form.send_email() return super(ContactView, self).form_valid(form) CreateView ---------- .. class:: django.views.generic.edit.CreateView Loading Loading @@ -107,6 +112,9 @@ editing content: class AuthorCreate(CreateView): model = Author UpdateView ---------- .. class:: django.views.generic.edit.UpdateView A view that displays a form for editing an existing object, redisplaying Loading Loading @@ -146,6 +154,9 @@ editing content: class AuthorUpdate(UpdateView): model = Author DeleteView ---------- .. class:: django.views.generic.edit.DeleteView A view that displays a confirmation page and deletes an existing object. Loading
docs/ref/class-based-views/index.txt +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ Class-based views API reference. For introductory material, see :doc:`/topics/class-based-views/index`. .. toctree:: :maxdepth: 1 :maxdepth: 3 base generic-display Loading