Merge pull request #1504 from vinyldarkscratch/master
Updated and functional version of #1420
This commit is contained in:
1
applications/examples/static/503.html
Normal file
1
applications/examples/static/503.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body><h1>Temporarily down for maintenance</h1></body></html>
|
||||
1
applications/welcome/static/503.html
Normal file
1
applications/welcome/static/503.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body><h1>Temporarily down for maintenance</h1></body></html>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user