django-pagination icon indicating copy to clipboard operation
django-pagination copied to clipboard

PAGINATION_INVALID_PAGE_RAISES_404 does not work

Open carljm opened this issue 14 years ago • 7 comments

If you set PAGINATION_INVALID_PAGE_RAISES_404 to True, the autopaginate call does indeed raise Http404, but this is then caught by a catchall "except Exception" in Django's template system, resulting in a debug page, or a 500 error in production.

Not sure what the solution is here; short of patching Django, seems like template tags can't raise 404.

carljm avatar Apr 26 '10 22:04 carljm

just set DEBUG to False in settings.py

elky avatar Aug 17 '10 11:08 elky

elky: this has nothing to do with DEBUG: it will raise a 500 error (TemplateSyntaxError: Caught Http404 while rendering) even with DEBUG = False.

diox avatar Sep 23 '10 14:09 diox

Hm, bug fixed this??

satels avatar Oct 18 '11 13:10 satels

This ever gonna happen?

Miserlou avatar Nov 03 '11 01:11 Miserlou

I think this project is dead. I might recommend an active fork: https://github.com/zyga/django-pagination

gtaylor avatar Nov 03 '11 03:11 gtaylor

Does the Linaro fork fix this bug?

Miserlou avatar Nov 03 '11 04:11 Miserlou

I believe so. If not, report it to his tracker and he's good about getting stuff fixed.

gtaylor avatar Nov 03 '11 14:11 gtaylor