diff --git a/VERSION b/VERSION index 9789059a..09070daf 100644 --- a/VERSION +++ b/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 diff --git a/applications/admin/controllers/gae.py b/applications/admin/controllers/gae.py index ddb13e0a..96dfc367 100644 --- a/applications/admin/controllers/gae.py +++ b/applications/admin/controllers/gae.py @@ -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 diff --git a/applications/admin/controllers/openshift.py b/applications/admin/controllers/openshift.py index e42b61fc..d1887df6 100644 --- a/applications/admin/controllers/openshift.py +++ b/applications/admin/controllers/openshift.py @@ -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))) diff --git a/gluon/settings.py b/gluon/settings.py index 76058408..92962570 100644 --- a/gluon/settings.py +++ b/gluon/settings.py @@ -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'))