You'll have to write a decorator that calls view_config. I've wished
it did that too.

On Sat, May 12, 2012 at 7:33 AM, Lingfeng Xiong <[email protected]> wrote:
> hi all,
> I'm new to Pyramid and trying to build a small application with it. I use
> the default template engine -- chameleon, and move all my views into a
> folder with the name of 'views' instead the single file 'views.py' in
> tutorials. However, I found each time I write a new view, I have to set the
> same path in @view_config just like:
>>
>> @view_config(route_name = 'login', renderer = '../templates/login.pt')
>
> Is there any way for me to set the default path for templates? I'd like to
> use
>>
>> @view_config(route_name = 'login', renderer = 'login.pt')
>
> to make declaration simpler.
> Thanks in advanced.
>
> BTW: And is there anyway to make @view_config use the function name as
> template file name automatically?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pylons-discuss/-/e8HY_rsqNGgJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.



-- 
Mike Orr <[email protected]>

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

Reply via email to