How can I test my custom 404 error page locally?

Responsive Ad Header

Question

Grade: Education Subject: Support
How can I test my custom 404 error page locally?
Asked by:
48 Viewed 48 Answers

Answer (48)

Best Answer
(309)
To test your custom 404 error page locally, set `DEBUG = False` in your `settings.py`. Then, run your Django development server and try accessing a URL that you know doesn't exist. Make sure your `urls.py` doesn't catch this URL and that you have a `404.html` template in your configured template directories.