fixed problem with GAE and custom-import, thanks howesc

This commit is contained in:
Massimo DiPierro
2011-11-25 21:51:09 -06:00
parent e3534136e6
commit 72651cf893
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.3 (2011-11-25 21:47:39) dev
Version 1.99.3 (2011-11-25 21:51:08) dev
+4
View File
@@ -83,6 +83,10 @@ def wsgiapp(env, res):
if global_settings.web2py_runtime == 'gae:development':
gluon.admin.create_missing_folders()
from gluon.custom_import import custom_import_install
web2py_path = global_settings.applications_parent # backward compatibility
custom_import_install(web2py_path)
return gluon.main.wsgibase(env, res)
+2 -2
View File
@@ -11,8 +11,8 @@ import threading
def custom_import_install(web2py_path):
global _web2py_importer
global _web2py_path
if _web2py_path == web2py_path:
return # Already installed
if isinstance(__builtin__.__import__, _Web2pyImporter):
return #aready installed
_web2py_path = web2py_path
_web2py_importer = _Web2pyImporter(web2py_path)
__builtin__.__import__ = _web2py_importer