Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
1225af69
Commit
1225af69
authored
Apr 15, 2018
by
Maël Kervella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add custom Error 500 page
parent
6c6422af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
0 deletions
+63
-0
re2o/urls.py
re2o/urls.py
+2
-0
re2o/views.py
re2o/views.py
+5
-0
static/images/500_hackerman.jpg
static/images/500_hackerman.jpg
+0
-0
templates/errors/500.html
templates/errors/500.html
+56
-0
No files found.
re2o/urls.py
View file @
1225af69
...
...
@@ -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'
),
...
...
re2o/views.py
View file @
1225af69
...
...
@@ -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'
)
static/images/500_hackerman.jpg
0 → 100644
View file @
1225af69
91.7 KB
templates/errors/500.html
0 → 100644
View file @
1225af69
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Re2o : Internal Server Error
</title>
<style>
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
;
}
</style>
</head>
<body>
<h1>
Error 500 : Internal Server Error
</h1>
<hr>
<p>
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.
</p>
<p>
<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.
</p>
<p>
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.
<p>
<p>
<img
src=
"/static/images/500_hackerman.jpg"
alt=
"Error 500 Funny Image"
/>
</p>
<p>
If you have no idea what you've done :
<a
href=
"/"
class=
"button"
>
Go back to a safe page
</a>
</p>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment