5 messages in com.googlegroups.pylons-discussRe: When does controllers/template/vi...
FromSent OnAttachments
Skip Montanaro25 Jan 2007 20:02 
Max Ischenko26 Jan 2007 02:11 
Skip Montanaro26 Jan 2007 04:08 
Skip Montanaro26 Jan 2007 20:49 
Max Ischenko27 Jan 2007 02:06 
Subject:Re: When does controllers/template/view get called?
From:Skip Montanaro (skip@public.gmane.org)
Date:01/26/2007 04:08:29 AM
List:com.googlegroups.pylons-discuss

Works just fine here. May be it's the version of Python interpreter (2.6)? What if you remove raise statement?

The raise statement was only my last attempt to get something to work. Note also the print and the unprotected call to render_response(). If I define view() as suggested in its docstring:

def view(self, url): try: return render_response('/'+url) except myghty.exception.ComponentNotFound: return Response(code=404)

I get the same result.

In case it's a routing issue here's my config/routing.make_map sans comments:

def make_map(global_conf={}, app_conf={}): root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

mapper = Mapper(directory=os.path.join(root_path, 'controllers'))

mapper.connect('error/:action/:id', controller='error') mapper.connect('', controller='hello', action='index') mapper.connect(':controller/:action/:id') mapper.connect('*url', controller='template', action='view')

return mapper

Skip