mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 12:34:43 +00:00
fix plugin-templating
This commit is contained in:
parent
0acd13aaca
commit
14d6dd55bc
@ -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()
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user