i need to write my own url router someday..

This commit is contained in:
Martijn Voncken 2008-11-08 14:13:49 +00:00
parent cb4320151d
commit db283d9a14
1 changed files with 5 additions and 2 deletions

View File

@ -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