#33233: Handle 404 Not Found Error when invalid page num comes is given to
ListView
-------------------------------------+-------------------------------------
Reporter: DongGeon | Owner: nobody
Lee |
Type: New | Status: assigned
feature |
Component: Generic | Version: 4.0
views | Keywords: ListView,
Severity: Normal | Paginator, Pagination
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
There is pagination in ListView and it show 404 error when page number is
out of page range.
It is reasonable but I think the options to control 404 exception always
should be there.
In current Implementation, if users want to handle 404
exception(`Http404`), they have to override whole `get_queryset()` in
`django.view.generic.list.py` or `validate_number()` in
`django.core.paginator.py`.
So I suggest the flag `allow_out_of_range: bool` in `MultipleObjectMixin`
class to on/off 404 exception.
(I already have a pull request ready to go.)
--
Ticket URL: <https://code.djangoproject.com/ticket/33233>
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/058.cba20d99aa5d6661df361d49f609be4a%40djangoproject.com.