I am using Django for a project and is already in production.
In the production environment 500.html is rendered whenever a server error occurs.
How do I tes
You can simply define the handler404
and handler500
for errors in your main views.py
file as detailed in this answer:
https://stackoverflow.com/a/18009660/1913888
This will return the error that you desire when Django routes to that handler. No custom URL configuration is needed to route to a different URL name.