diff --git a/VERSION b/VERSION index e5127d4a..ff3646ef 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.3 (2011-11-25 21:47:39) dev +Version 1.99.3 (2011-11-25 21:51:08) dev diff --git a/gaehandler.py b/gaehandler.py index 9c00ab19..5ead709a 100755 --- a/gaehandler.py +++ b/gaehandler.py @@ -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) diff --git a/gluon/custom_import.py b/gluon/custom_import.py index 763b3efd..65bb467d 100644 --- a/gluon/custom_import.py +++ b/gluon/custom_import.py @@ -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