RoutesApplication in colubrid-0.10

5 views
Skip to first unread message

skam

unread,
Dec 21, 2006, 6:45:21 AM12/21/06
to colubrid-users
Hello,
Moving from colubrid 0.9.8 to 0.10 applications that inherits from
RoutesApplication class doesn't work: BaseApplication process_request
method is called, that raises a NotImplementedError exception.

To avoid this, I modified 2 lines in the application.py source:

class RoutesApplication(BaseApplication):
"""
Application that uses Routes (http://routes.groovie.org/) to
dispatch URLs.
"""
__metaclass__ = RoutesMapperClass

def __init__(self, environ, start_response):
def create_request(e, s, c):
return RoutesRequest(self, e, s, c)
super(RoutesApplication, self).__init__(environ,
start_response,
create_request)

def process_request(self):
path = self.request.environ.get('PATH_INFO') or '/'
match = self._routes_mapper.match(path)
if match is None:
raise PageNotFound()

handler = self._routes_controllers[match['controller']]
app = handler.im_class()
app.request = self.request

if match['action'] == 'index':
del match['action']
del match['controller']

return handler(app, **match)

Bye,
Massimo

skam

unread,
Dec 21, 2006, 9:30:04 AM12/21/06
to colubrid-users
The source in the svn repos is ok, this problem is only in the egg
(installed using easy_install)

dzu...@gmail.com

unread,
Dec 22, 2006, 1:05:36 AM12/22/06
to colubrid-users
Hi, I faced this problem too. Is the current svn version going to be
wrapped in egg and uploaded to cheeseshop?

skam

unread,
Jan 9, 2007, 4:07:48 AM1/9/07
to colubrid-users
I opened a new ticket in Pocoo trac site (Ticket #182)

bye,
Max

Reply all
Reply to author
Forward
0 new messages