Re: Dynamic template rendering

2011-06-28 Thread Liju
Thanks Mike. On Jun 28, 12:22 pm, Michael Merickel wrote: > >     def null_view(request): > >         pass > > That "pass" should actually be a "return {}", because if a view is using a > renderer it needs to return a dictionary. > > -- > > Michael -- You received this message because you are s

Re: Dynamic template rendering

2011-06-28 Thread Michael Merickel
> > def null_view(request): > pass > That "pass" should actually be a "return {}", because if a view is using a renderer it needs to return a dictionary. -- Michael -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to thi

Re: Dynamic template rendering

2011-06-28 Thread Michael Merickel
On Tue, Jun 28, 2011 at 1:52 PM, Liju wrote: > But was checking if there was a way to invoke a template > directly without having to route request to a view, like JSP (in > J2EE). > > But I guess its not worth it. > > On Jun 28, 11:27 am, Michael Merickel wrote: > > All of Pyramid's template ren

Re: Dynamic template rendering

2011-06-28 Thread Liju
Yes I understand if you have a view we can pass response using a template. But was checking if there was a way to invoke a template directly without having to route request to a view, like JSP (in J2EE). But I guess its not worth it. On Jun 28, 11:27 am, Michael Merickel wrote: > All of Pyramid'

Re: Dynamic template rendering

2011-06-28 Thread Michael Merickel
All of Pyramid's template rendering is handled in the context of a request. This is primarily because the template lookup is handled through the registry which is attached to the request. If you have the registry, you can use pyramid.renderers.render() with a dummy request object in order to use th

Dynamic template rendering

2011-06-28 Thread Liju
Using render_to_response in a view we can forward control to any 'templates' (I use mako). My question is, is it possible to access a template directly using URL without 'add_view' for each view/template ? Like how 'JSP's can be accessed directly in J2EE ? I'm writing a template, that is supposed