comparison roundup/instance.py @ 5001:01d14361cae7 routing

Transform instance.web_handlers to list to maintain order
author anatoly techtonik <techtonik@gmail.com>
date Fri, 11 Sep 2015 09:44:31 +0300
parents 082ee3ded101
children
comparison
equal deleted inserted replaced
5000:082ee3ded101 5001:01d14361cae7
55 self.config = configuration.CoreConfig(tracker_home) 55 self.config = configuration.CoreConfig(tracker_home)
56 56
57 self.actions = {} 57 self.actions = {}
58 self.cgi_actions = {} 58 self.cgi_actions = {}
59 self.templating_utils = {} 59 self.templating_utils = {}
60 self.web_handlers = {} 60 self.web_handlers = []
61 61
62 libdir = os.path.join(self.tracker_home, 'lib') 62 libdir = os.path.join(self.tracker_home, 'lib')
63 self.libdir = os.path.isdir(libdir) and libdir or '' 63 self.libdir = os.path.isdir(libdir) and libdir or ''
64 64
65 self.load_interfaces() 65 self.load_interfaces()
239 matching urls in Django-like format and is processed 239 matching urls in Django-like format and is processed
240 by roundup.web.router before Roundup tries to match 240 by roundup.web.router before Roundup tries to match
241 urls against class names in DB. 241 urls against class names in DB.
242 242
243 New in version 1.6.x""" 243 New in version 1.6.x"""
244 self.web_handlers[urlpath] = function 244 self.web_handlers.append( [urlpath, function] )
245 245
246 def registerUtil(self, name, function): 246 def registerUtil(self, name, function):
247 self.templating_utils[name] = function 247 self.templating_utils[name] = function
248 248
249 class TrackerError(Exception): 249 class TrackerError(Exception):

Roundup Issue Tracker: http://roundup-tracker.org/