template_static:fix config bug

This commit is contained in:
Martijn Voncken 2008-04-08 16:54:20 +00:00
commit c282132574

View file

@ -50,8 +50,11 @@ from operator import attrgetter
import os import os
from deluge import component from deluge import component
from deluge.ui.client import sclient as proxy from deluge.ui.client import sclient as proxy
from deluge.configmanager import ConfigManager
page_manager = component.get("PageManager") page_manager = component.get("PageManager")
config = ConfigManager("webui.conf")
def route(url, klass): def route(url, klass):
""" """
url-mapping is using page_manager url-mapping is using page_manager
@ -364,7 +367,7 @@ route("/static/(.*)", static)
class template_static(static_handler): class template_static(static_handler):
def get_base_dir(self): def get_base_dir(self):
return os.path.join(os.path.dirname(__file__), return os.path.join(os.path.dirname(__file__),
'templates/%s/static' % ws.config.get('template')) 'templates/%s/static' % config.get('template'))
route("/template/static/(.*)", template_static) route("/template/static/(.*)", template_static)
class robots: class robots: