Commit 1225af69 authored by Maël Kervella's avatar Maël Kervella
Browse files

Add custom Error 500 page

parent 6c6422af
......@@ -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'),
......@@ -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')
<!DOCTYPE html>
<html lang="en">
<title>Re2o : Internal Server Error</title>
body {
padding: 0 1cm;
p {
padding: 0 2cm;
img {
width: 50%;
margin: 0 auto;
display: block;
a.button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;
text-decoration: none;
color: initial;
<h1>Error 500 : Internal Server Error</h1>
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.
<b>An email has been automatically sent to the site administrators. Please avoid
spamming them by trigerring the same issue multiple times.</b> 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.
<img src="/static/images/500_hackerman.jpg" alt="Error 500 Funny Image" />
If you have no idea what you've done :
<a href="/" class="button">Go back to a safe page</a>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment