fix plugin-templating

This commit is contained in:
Martijn Voncken 2008-07-05 11:22:16 +00:00
parent 0acd13aaca
commit 14d6dd55bc
2 changed files with 18 additions and 2 deletions

View File

@ -175,12 +175,28 @@ class ConfigPageManager(component.Component):
def unregister(self, name):
del self.blocks[name]
class PluginApi(component.Component):
"""
"""
def __init__(self):
component.Component.__init__(self, "WebPluginApi")
import web
from render import render
import page_decorators as deco
self.render = render
self.web = web
self.deco = deco
self.page_manager = component.get("PageManager")
def register():
__plugin_manager = PluginManager()
__menu_manager = MenuManager()
__page_manager = PageManager()
__config_page_manager = ConfigPageManager()
__plugin_api = PluginApi()

View File

@ -48,11 +48,11 @@ class subclassed_render(object):
"""
def __init__(self):
self.apply_cfg()
self.plugin_renderers = []
def apply_cfg(self):
self.cache = config.get('cache_templates')
self.renderers = []
self.plugin_renderers = []
self.template_cache = {}
self.webui_path = os.path.dirname(__file__)
@ -70,7 +70,7 @@ class subclassed_render(object):
@logcall
def register_template_path(self, path):
self.plugin_renderers.append(template.render(path))
self.plugin_renderers.append(template.render(path , cache=False))
@logcall
def unregister_template_path(self, path):