Changes between Initial Version and Version 3 of Ticket #33233


Ignore:
Timestamp:
Oct 28, 2021, 9:51:14 AM (3 years ago)
Author:
DongGeon Lee
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33233

    • Property Cc DongGeon Lee added
    • Property Owner changed from nobody to DongGeon Lee
    • Property Summary Handle 404 Not Found Error when invalid page num comes is given to ListViewHandle 404 Not Found Error when page number is out of page range
  • Ticket #33233 – Description

    initial v3  
    11There is pagination in ListView and it show 404 error when page number is out of page range.
    22It is reasonable but I think the options to control 404 exception always should be there.
    3 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`.
     3In current Implementation, if users want to handle 404 exception(`Http404`), they have to override whole `get_queryset()` in `django.view.generic.list.MultipleObjectMixin` or `validate_number()` in `django.core.paginator.Paginator`.
    44
    55So I suggest the flag `allow_out_of_range: bool` in `MultipleObjectMixin` class to on/off 404 exception.
Back to Top