Reputation: 189
I have set a HTML page 500.html in my main direcroty.
It will show this page when HTML 500 Internal Server Error
occurs.
How can I generate this error to check if it works?
I'm gussesing I should somehow raise exception of some sort.
How do I do that?
Upvotes: 1
Views: 2956
Reputation: 1114
Try editing the urls.py as follows:
if settings.DEBUG:
urlpatterns += patterns('',
(r'^500/$', 'django.views.defaults.server_error'),
)
Then try accessing the page as follows:
Upvotes: 2