added awesome pink skull and crossbone 404 error page

This commit is contained in:
Micah Lee 2014-05-22 19:49:42 -04:00
parent ef18336520
commit 066b0239ee
2 changed files with 19 additions and 0 deletions

15
404.html Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Error 404</title>
<style type="text/css">
body {
background-color: #FFC4D5;
color: #FF0048;
text-align: center;
font-size: 30em;
}
</style>
</head>
<body>&#9760;</body>
</html>

View File

@ -31,6 +31,10 @@ def download():
basename = os.path.basename(filename)
return send_from_directory(dirname, basename, as_attachment=True)
@app.errorhandler(404)
def page_not_found(e):
return render_template_string(open('{0}/404.html'.format(os.path.dirname(__file__))).read())
def get_platform():
if 'ONIONSHARE_PLATFORM' in os.environ:
return os.environ['ONIONSHARE_PLATFORM']