On Thu, 24 Feb 2011 12:13:26 -0800, AwaisMuzaffar wrote:

> Lets assume, I have the following route set up:
> 
> config.add_route('pages', '/{page}/', view='testproject:views.pages',
> view_renderer='testproject:templates/page.mak')
> 
> Would it be possible to make the template name e.g page.mak a variable
> that matches the name of the response path.

I ended up changing request.override_render in my view function.  See the 
very end of http://docs.pylonsproject.org/projects/pyramid/1.0/narr/
renderers.html.  One thing to watch for:  I had to set a renderer in the 
call to config.add_route (I think I used "not None").

HTH,
Dan

-- 
Dan Sommers                                   A death spiral goes clock-
<http://www.tombstonezero.net/dan/>           wise north of the equator.
Atoms are not things. -- Werner Heisenberg              -- Dilbert's PHB

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to