Merge pull request #1504 from vinyldarkscratch/master

Updated and functional version of #1420
This commit is contained in:
mdipierro
2016-10-14 10:12:36 -05:00
committed by GitHub
3 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1 @@
<html><body><h1>Temporarily down for maintenance</h1></body></html>

View File

@@ -0,0 +1 @@
<html><body><h1>Temporarily down for maintenance</h1></body></html>

View File

@@ -390,7 +390,11 @@ def wsgibase(environ, responder):
% 'invalid request',
web2py_error='invalid application')
elif not request.is_local and exists(disabled):
raise HTTP(503, "<html><body><h1>Temporarily down for maintenance</h1></body></html>")
five0three = os.path.join(request.folder,'static','503.html')
if os.path.exists(five0three):
raise HTTP(503, file(five0three, 'r').read())
else:
raise HTTP(503, "<html><body><h1>Temporarily down for maintenance</h1></body></html>")
# ##################################################
# build missing folders