#25045: Django 1.8.2 handler404 and handler500 no longer work
------------------------------+------------------------
Reporter: simon9999 | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 1.8
Severity: Normal | Keywords: handler404
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------
I've been testing with DEBUG=False under 'python manage.py runserver'.
As per the dox, I have added into my ROOT url file, the required
overrides:
{{{
from django.conf.urls import *
from django.contrib import admin
from django.http import HttpResponse
handler404 = 'urls.custom_handler'
handler500 = 'urls.custom_handler'
urlpatterns = [
url(r'^apikey/', include('apikey.urls', namespace='apikey')),
url(r'^admin/', include(admin.site.urls)),
]
def custom_handler(request):
print '---->>>> got to here!'
raise Exception
return HttpResponse('<h1>Boo! - Page not found</h1>')
}}}
I have created both the default 404.html and 500.html templates in my
apikey/templates directory and updated the site settings file to reflect
this
and I can confirm that this default 404.html and 500.html files are indeed
getting rendered, but '''not''' by my routine.
My custom handler never, '''ever''' fires when a 404 or 500 is raised.
I am at a loss as to why this has stopped working and I have been
searching both the tickets DB and the net for a solution so it may well be
a bug.
--
Ticket URL: <https://code.djangoproject.com/ticket/25045>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.a42e4033ff64a5f61af88de805649d71%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.