#35682: Clarify Base<FOO>View usage in docstrings.
-------------------------------------+-------------------------------------
Reporter: Jesús Leganés- | Owner:
Combarro | YashRaj1506
Type: | Status: assigned
Cleanup/optimization |
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
-------------------------------------+-------------------------------------
Comment (by Clifford Gama):
> So one way is We can add a docstring that this class(`BaseListView`) is
meant to be subclassed by `ListView`, so use `ListView` and let
`BaseListView` be just a base class meant to be inherited (we will raise a
error too) . Would like to know your opinion, accordingly i will make the
pr.
I don't think that's quite accurate. While it is true that `ListView`
subclasses `BaseListView`, it does not follow that `BaseListView` must
always be subclassed by `ListView`.
I think better is:
`Using this base class requires subclassing to provide a response
mixin.`
which I copied from `BaseUpdateView`.
Btw, you may want to look at other `BaseFOOView`s to see how they handle
that, and also if other abstract base views are also missing that in their
docstring.
--
Ticket URL: <https://code.djangoproject.com/ticket/35682#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019164c8dd5e-cb7efda0-3213-4fc0-8c3c-20a2e49ec455-000000%40eu-central-1.amazonses.com.