handler404 = 'application.views.handler404'Now simply create a views.py module in your application and define a handler404 method:
from cms.views import details def handler404(request): return details(request, 'page-not-found')Finally, via the Django CMS interface create a page with the slug 'page-not-found'. The contents of this page now be displayed in place of the default. I use this page to display a message and the site map to the user.
Make sure you publish the page, otherwise you will get a server error instead!
I would recommend removing all but the necessary permissions on this CMS page, to stop pesky non-super-users from removing it...
Using this the page will return "200 OK", instead of "404 Not Found". You can check my fix here http://goo.gl/hFaUz
ReplyDelete