settings.is_source
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.6.0-development+timestamp.2013.08.07.18.02.33
|
||||
Version 2.6.0-development+timestamp.2013.08.08.03.23.58
|
||||
|
||||
@@ -16,6 +16,11 @@ if MULTI_USER_MODE and not is_manager():
|
||||
session.flash = 'Not Authorized'
|
||||
redirect(URL('default', 'site'))
|
||||
|
||||
from gluon.settings import settings
|
||||
if not settings.is_source:
|
||||
session.flash = 'Requires running web2py from source'
|
||||
redirect(URL(request.application, 'default', 'site'))
|
||||
|
||||
forever = 10 ** 8
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ except ImportError:
|
||||
session.flash = T('requires python-git, but not installed')
|
||||
redirect(URL('default', 'site'))
|
||||
|
||||
from gluon.settings import settings
|
||||
if not settings.is_source:
|
||||
session.flash = 'Requires running web2py from source'
|
||||
redirect(URL(request.application, 'default', 'site'))
|
||||
|
||||
def deploy():
|
||||
apps = sorted(file for file in os.listdir(apath(r=request)))
|
||||
|
||||
@@ -36,3 +36,6 @@ global_settings.is_jython = \
|
||||
'java' in sys.platform.lower() or \
|
||||
hasattr(sys, 'JYTHON_JAR') or \
|
||||
str(sys.copyright).find('Jython') > 0
|
||||
|
||||
global_settings.is_source = os.path.exists(os.path.join(
|
||||
global_settings.gluon_parent,'web2py.py'))
|
||||
|
||||
Reference in New Issue
Block a user