How to set up a template for django 404 error

I want to do everything that is written here

Make sure your 404 template works

Please note that only the steps of FlatpageFallbackMiddleware at one time another view successfully generated a 404 response. If another view or intermediate class. produce 404, but end up with an exception (for example, a TemplateDoesNotExist exception if your site does not have an appropriate template for HTTP 404 responses), the response will be HTTP 500 ("Internal server error") and FlatpageFallbackMiddleware will not attempt to serve the flat page.

Can someone tell me what I need to do to create a 404 template

+4
source share
1 answer

Follow the tips in setting up 404 processing .

In particular, assuming you're not going to write your own 404 view, this tip is important:

If DEBUG set to False (in your settings module), and if you have not created the 404.html file, 404.html is created Http500 . Therefore, be sure to create 404.html .

+4
source

All Articles