diff --git a/re2o/urls.py b/re2o/urls.py index 52eafaab..b1cccfd9 100644 --- a/re2o/urls.py +++ b/re2o/urls.py @@ -48,6 +48,8 @@ from django.contrib.auth import views as auth_views from .views import index, about_page +handler500 = 're2o.views.handler500' + urlpatterns = [ url(r'^$', index, name='index'), url(r'^about/$', about_page, name='about'), diff --git a/re2o/views.py b/re2o/views.py index 35635992..19b52832 100644 --- a/re2o/views.py +++ b/re2o/views.py @@ -209,3 +209,8 @@ def about_page(request): 'dependencies': dependencies } ) + + +def handler500(request): + """The handler view for a 500 error""" + return render(request, 'errors/500.html') diff --git a/static/images/500_hackerman.jpg b/static/images/500_hackerman.jpg new file mode 100644 index 00000000..b15314db Binary files /dev/null and b/static/images/500_hackerman.jpg differ diff --git a/templates/errors/500.html b/templates/errors/500.html new file mode 100644 index 00000000..98a70466 --- /dev/null +++ b/templates/errors/500.html @@ -0,0 +1,56 @@ + + + + Re2o : Internal Server Error + + + + + +

Error 500 : Internal Server Error

+
+

+ Congratulations !! You have discovered a bug on Re2o and you've reached a page we try + to hide, you can be proud of youself. We try to track those bugs down but apparently + we have missed one. We sincerely thank you for the help : it is not that easy to catch + them all. +

+

+ An email has been automatically sent to the site administrators. Please avoid + spamming them by trigerring the same issue multiple times. The mail should + contains all the details necessary to understand what went wrong but if your help was + needed, you will probably be contacted by them. +

+

+ This issue will be fixed as soon as possible but please take into consideration the + administrators may not be always available. If your request is really urgent, inform + your local organization, they will help you temporarily fix the issue. +

+

+ Error 500 Funny Image +

+

+ If you have no idea what you've done : + Go back to a safe page +

+ +