Opened 13 years ago
Closed 13 years ago
#16464 closed Bug (fixed)
Ref for DateDetailView lists wrong mixins
Reported by: | 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)
Change History (9)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 13 years ago
Has patch: | set |
---|
comment:4 by , 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 , 13 years ago
Attachment: | DateDetailView-mixins-16464.diff added |
---|
comment:5 by , 13 years ago
Patch needs improvement: | unset |
---|
Removed BaseTodayArchiveView. Mixin DayArchiveView was lready listed.
by , 13 years ago
Attachment: | 16464.class-based-views-doc-fixes.diff added |
---|
Doc fixes to reflect my previous comments
Accepted. Note that
SingleObjectTemplateResponseMixin
is in thedjango.views.generic.detail
package. Also,BaseDateListView
should be replaced bydjango.views.generic.detail.BaseDetailView
, notdjango.views.generic.dates.BaseDateDetailView
.DateMixin
is also missing from the list of mixins forDateDetailView
.On a related matter, a bit further up the docs stipulate that
TodayArchiveView
inherits fromDayArchiveView
whereas in fact it just happens to inherit from the same mixins asDayArchiveView
, i.e.MultipleObjectTemplateResponseMixin
andBaseDayArchiveView
. 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.