Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend
Commits
b144b2cc
Commit
b144b2cc
authored
Oct 02, 2020
by
Lukas Böhm
Browse files
general error view
parent
3f765105
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/routes.py
View file @
b144b2cc
import
uuid
import
os
from
datetime
import
datetime
,
timedelta
from
werkzeug.exceptions
import
HTTPException
from
werkzeug.utils
import
secure_filename
from
app
import
app
,
db
from
flask
import
redirect
,
url_for
,
render_template
,
send_from_directory
,
current_app
,
abort
...
...
@@ -68,6 +69,11 @@ def index():
return
redirect
(
url_for
(
'upload'
))
@
app
.
errorhandler
(
HTTPException
)
def
http_error
(
e
):
return
render_template
(
'Error.html'
,
e
=
e
)
@
app
.
route
(
'/expired'
)
@
app
.
errorhandler
(
404
)
def
expired
(
e
=
None
):
...
...
app/templates/Error.html
0 → 100644
View file @
b144b2cc
{% extends 'BasePage.html' %}
{% block content %}
<div
class=
"pricing-header px-3 py-3 pt-md-5 pb-md-4 mx-auto text-center"
>
<h1
class=
"display-4"
>
Fehler {{ e.code }} - {{ e.name }}
</h1>
<p
class=
"lead"
>
Es tut uns leid, aber es ist etwas schief gelaufen.
</p>
<small
class=
"d-block mb-3 text-muted"
>
{{ e.description }}
</small>
</div>
{% endblock content %}
Write
Preview
Supports
Markdown
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