Re: [Django] #35682: Clarify Base<FOO>View usage in docstrings. (was: `BaseListView` class calling non existing `render_to_response()` method)

7 views
Skip to first unread message

Django

unread,
Aug 15, 2024, 7:44:22 AM8/15/24
to django-...@googlegroups.com
#35682: Clarify Base<FOO>View usage in docstrings.
-------------------------------------+-------------------------------------
Reporter: Jesús Leganés- | Owner: (none)
Combarro |
Type: Bug | Status: new
Component: Generic views | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):

* easy: 0 => 1
* stage: Unreviewed => Accepted
* summary:
`BaseListView` class calling non existing `render_to_response()`
method
=> Clarify Base<FOO>View usage in docstrings.

Comment:

From reading the code, it looks like the `BaseListView` like the other
`Base<FOO>View`s are not meant to be subclassed.
I tried creating a view inheriting the ``BaseDetailView`` , and I got the
same error:

`'MyBaseDetailView' object has no attribute 'render_to_response'`

This line is missing from the docstring in `BaseListView` and the
`BaseDetailView`.

"Using this base class requires subclassing to provide a response mixin."

And I think that needs to be added. But you may have to check if other
`Base<FOO>View` also need that documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/35682#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages