In my django project using mod_wsgi 3.4 and apache, all 404 pages are not returned as a 404 error, but as a 500 server error:
When debug is set to true, it returns a 404 error, django’s.
Page not found (404)
Request Method: GET
Request URL: ..
No Model matches the given query.
You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
Can anyone else who has experienced this problem before give some pointers or guides for fixing this issue?
Thank you.
This probably is not a mod_wsgi bug.
Please make sure you have a
404.htmlfile in your ‘templates’ folder. If Django cannot locate a template for the 404 error, it serves up an Internal 500 error.Note: If this doesn’t solve the error, please take a look at this page on how to make a 404 error page work.