From db283d9a1404853c2bbe5cca34dac6aafb177f6d Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Sat, 8 Nov 2008 14:13:49 +0000 Subject: [PATCH] i need to write my own url router someday.. --- deluge/ui/webui/components.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deluge/ui/webui/components.py b/deluge/ui/webui/components.py index 488951805..7e7cee813 100644 --- a/deluge/ui/webui/components.py +++ b/deluge/ui/webui/components.py @@ -119,8 +119,11 @@ class PageManager(component.Component): self.urls += url_list self.page_classes.update(class_list) - def register_page(self, url, klass): - name = klass.__module__ + "." + klass.__name__ + def register_page(self, url, klass, use_module=False): + if use_module: + name = klass.__module__ + "." + klass.__name__ + else: + name = klass.__name__ self.urls.append(url) self.urls.append(name) self.page_classes[name] = klass