|
@@ -203,16 +203,20 @@ def site_load(data_path):
|
203
|
203
|
LodelHook.call_hook('lodel2_plugins_loaded', 'bootstrap', None)
|
204
|
204
|
#triggering boostrapped hook
|
205
|
205
|
LodelHook.call_hook('lodel2_bootstraped', 'bootstrap', None)
|
206
|
|
- #Populating FAST_APP_EXPOSAL_CACHE
|
|
206
|
+ #Populating FAST_APP_EXPOSAL_CACHE with wsgi application function
|
207
|
207
|
#
|
208
|
208
|
#WARNING !!!! Hardcoded interface name ! Here we have to find the
|
209
|
209
|
#interface plugin name in order to populate the cache properly
|
210
|
|
- FAST_APP_EXPOSAL_CACHE[ctx_name] = LodelContext.module(
|
211
|
|
- 'lodel.plugins.webui.run')
|
|
210
|
+ app = LodelContext.module('lodel.plugins.webui.run')
|
|
211
|
+ #HAS TO be populated in __loader__ context
|
|
212
|
+ LodelContext.set(None)
|
|
213
|
+ LodelContext.expose_modules(globals(), {
|
|
214
|
+ 'lodel.plugins.multisite.loader_utils': ['FAST_APP_EXPOSAL_CACHE']})
|
|
215
|
+ FAST_APP_EXPOSAL_CACHE[ctx_name] = app
|
212
|
216
|
#a dirty & quick attempt to fix context unwanted exite via
|
213
|
217
|
#hooks
|
214
|
|
- for name in ( 'LodelHook', 'core_hooks', 'core_scripts',
|
215
|
|
- 'Settings', 'settings', 'logger', 'Plugin'):
|
|
218
|
+ for name in ( 'Plugin', 'LodelHook', 'logger', 'core_hooks',
|
|
219
|
+ 'core_scripts'):
|
216
|
220
|
del(globals()[name])
|
217
|
221
|
#site fully loaded, switching back to loader context
|
218
|
222
|
LodelContext.set(None)
|