Opened 13 years ago

Closed 13 years ago

#16464 closed Bug (fixed)

Ref for DateDetailView lists wrong mixins

Reported by: michal@… Owned by: teraom
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://code.djangoproject.com/browser/django/trunk/docs/ref/class-based-views.txt?rev=16381#L1303

Lists:

  • :class:django.views.generic.list.MultipleObjectTemplateResponseMixin
  • :class:django.views.generic.dates.BaseDateListView

As mixins for the DateDetailView, when according to:
https://code.djangoproject.com/browser/django/trunk/django/views/generic/dates.py?rev=16363#L481

the correct entries should be:

  • :class:django.views.generic.list.SingleObjectTemplateResponseMixin
  • :class:django.views.generic.dates.BaseDateDetailView

Attachments (2)

DateDetailView-mixins-16464.diff (988 bytes ) - added by teraom 13 years ago.
16464.class-based-views-doc-fixes.diff (1.6 KB ) - added by Julien Phalip 13 years ago.
Doc fixes to reflect my previous comments

Download all attachments as: .zip

Change History (9)

comment:1 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedAccepted

Accepted. Note that SingleObjectTemplateResponseMixin is in the django.views.generic.detail package. Also, BaseDateListView should be replaced by django.views.generic.detail.BaseDetailView, not django.views.generic.dates.BaseDateDetailView. DateMixin is also missing from the list of mixins for DateDetailView.

On a related matter, a bit further up the docs stipulate that TodayArchiveView inherits from DayArchiveView whereas in fact it just happens to inherit from the same mixins as DayArchiveView, i.e. MultipleObjectTemplateResponseMixin and BaseDayArchiveView. I'm saying this just to point out that it might be worth scanning for other similar inconsistencies or inaccuracies in the rest of that doc page.

comment:2 by teraom, 13 years ago

Owner: changed from nobody to teraom
Status: newassigned

comment:3 by teraom, 13 years ago

Has patch: set

comment:4 by Julien Phalip, 13 years ago

Patch needs improvement: set

This is great, thank you. Just one little thing: if we follow the convention in other documented views on that page, then BaseDayArchiveView (instead of BaseTodayArchiveView) should be mentioned as a mixin of TodayArchiveView.

Also, now that I'm looking at it again, the doc for TodayArchiveView says: "This is exactly the same as archive_day". archive_day has now been deprecated so it shouldn't be mentioned any more. I guess DayArchiveView should be mentioned instead.

by teraom, 13 years ago

comment:5 by teraom, 13 years ago

Patch needs improvement: unset

Removed BaseTodayArchiveView. Mixin DayArchiveView was already listed.

Last edited 13 years ago by teraom (previous) (diff)

by Julien Phalip, 13 years ago

Doc fixes to reflect my previous comments

comment:6 by Aymeric Augustin, 13 years ago

Triage Stage: AcceptedReady for checkin

Good to go.

comment:7 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: assignedclosed

In [16563]:

Fixed #16464 -- Fixed the reference docs of the DateDetailView view. Thanks, Julien Phalip.

Note: See TracTickets for help on using tickets.
Back to Top