handlers check for 'applications' folder
This commit is contained in:
committed by
Michele Comitini
parent
72b3092ef6
commit
13c782eaa6
@@ -1 +1 @@
|
|||||||
Version 2.6.0-development+timestamp.2013.08.27.16.49.41
|
Version 2.6.0-development+timestamp.2013.08.27.16.57.03
|
||||||
|
|||||||
+3
-3
@@ -1,3 +1,3 @@
|
|||||||
This folder contains example files.
|
This folder contains example handlers.
|
||||||
They much be copied to the web2py root folder in order to work properly.
|
They must be copied to the web2py root folder in order to work properly.
|
||||||
They should not be linked in the handlers folder.
|
They should not be used in their current location.
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ import wsgiref.handlers
|
|||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
|
if not os.path.exists('applications'):
|
||||||
|
raise RuntimeError('Running from the wrong folder')
|
||||||
|
|
||||||
sys.path = [path] + [p for p in sys.path if not p == path]
|
sys.path = [path] + [p for p in sys.path if not p == path]
|
||||||
|
|
||||||
import gluon.main
|
import gluon.main
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ import os
|
|||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
|
if not os.path.exists('applications'):
|
||||||
|
raise RuntimeError('Running from the wrong folder')
|
||||||
|
|
||||||
sys.path = [path] + [p for p in sys.path if not p == path]
|
sys.path = [path] + [p for p in sys.path if not p == path]
|
||||||
|
|
||||||
import gluon.main
|
import gluon.main
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ import wsgiref.handlers
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
# os.chdir(path) ?
|
||||||
|
|
||||||
|
if not os.path.exists('applications'):
|
||||||
|
raise RuntimeError('Running from the wrong folder')
|
||||||
|
|
||||||
sys.path = [path] + [p for p in sys.path if not p == path]
|
sys.path = [path] + [p for p in sys.path if not p == path]
|
||||||
|
|
||||||
sys.modules['cPickle'] = sys.modules['pickle']
|
sys.modules['cPickle'] = sys.modules['pickle']
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ def __ExtensionFactory__():
|
|||||||
import sys
|
import sys
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
if not os.path.exists('applications'):
|
||||||
|
raise RuntimeError('Running from the wrong folder')
|
||||||
sys.path = [path] + [p for p in sys.path if not p == path]
|
sys.path = [path] + [p for p in sys.path if not p == path]
|
||||||
import gluon.main
|
import gluon.main
|
||||||
import isapi_wsgi
|
import isapi_wsgi
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ from mod_python import apache
|
|||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
|
if not os.path.exists('applications'):
|
||||||
|
raise RuntimeError('Running from the wrong folder')
|
||||||
|
|
||||||
sys.path = [path] + [p for p in sys.path if not p == path]
|
sys.path = [path] + [p for p in sys.path if not p == path]
|
||||||
|
|
||||||
import gluon.main
|
import gluon.main
|
||||||
|
|||||||
@@ -47,6 +47,10 @@ import os
|
|||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
|
if not os.path.exists('applications'):
|
||||||
|
raise RuntimeError('Running from the wrong folder')
|
||||||
|
|
||||||
sys.path = [path] + [p for p in sys.path if not p == path]
|
sys.path = [path] + [p for p in sys.path if not p == path]
|
||||||
|
|
||||||
import gluon.main
|
import gluon.main
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ import os
|
|||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
|
if not os.path.exists('applications'):
|
||||||
|
raise RuntimeError('Running from the wrong folder')
|
||||||
|
|
||||||
sys.path = [path] + [p for p in sys.path if not p == path]
|
sys.path = [path] + [p for p in sys.path if not p == path]
|
||||||
|
|
||||||
sys.stdout = sys.stderr
|
sys.stdout = sys.stderr
|
||||||
|
|||||||
Reference in New Issue
Block a user