i want to create my own 404 page. In settings.py I have added:
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ['*',]
In urls.py:
handler404 = 'blog.views.handler404'
In views.py:
def handler404(request):
return render(request, 'blog/404.html')
Also I have created that 404.html file.
When i start server i write:
python manage.py runserver --insecure
--insecure is to provide static files (otherwise it is nonsense). But if i go non existing page i get:
<h1>Not Found</h1><p>The requested URL /post/9/ was not found on this server.</p>
How do I solve this? I am using Django 1.8 dunno if this changes anything
Not Found
The requested URL /post/9/ was not found on this server.
, when it is True i get standart django debug error page – pptt Jun 17 '15 at 19:14