Thanks for your reply, Bard!

I agree. In the end, I decided to create a new Mako module factory to use
apart from Pyramid's template lookup interface. Michael Merickel gave me
some good insight to this problem with his SO answer
http://stackoverflow.com/questions/15509786/get-mako-template-from-within-pyramid-app-view,
but, like you said, we still can't play with the Pyramid Mako factory until
after the first view call.

I can understand the reasoning for the current implementation, however, it
also would be nice to have a single Mako factory that can be accessed
easily outside of views.

-Vincent


On Sat, Mar 23, 2013 at 4:57 PM, bard stéphane <[email protected]>wrote:

> thank's vincent to give a coin on this subject
> I've already submit a mail on this subject on 02/03, and didn't receive
> any answer :/
>
> for me, and after playing with pyramid, the template lookup
> is create after the first call of mako renderer as a zca utility.
> We cant' play with it before any view create him and can't
> modify the way he is build
>
> so ...
> to complete template_lookup, I think that we don't have the choice
> of completly write another mako module factory and overwrite template
> renderer resolution as describe in the documentation.
>
> that's a mess ...
>
> Le 19/03/2013 07:14, Vincent Catalano a écrit :
>
>> Hello Pyramid community,
>>
>> I was wondering if it's possible to get the Mako templates lookup
>> interface from within a view callable. Looking at the mako_templating.py
>> file in source I notice that there is an interface for adjusting Mako
>> template file lookups as well as a get_template method (in order to account
>> for packing naming conventions, etc.). Would it be possible to use this
>> lookup object and how might I be able to access it so that I could call the
>> get_template function?
>>
>> Thanks for your help!
>>
>> -Vincent
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 
>> pylons-discuss+unsubscribe@**googlegroups.com<pylons-discuss%[email protected]>
>> .
>> To post to this group, send email to 
>> pylons-discuss@googlegroups.**com<[email protected]>
>> .
>> Visit this group at 
>> http://groups.google.com/**group/pylons-discuss?hl=en<http://groups.google.com/group/pylons-discuss?hl=en>
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> pylons-discuss+unsubscribe@**googlegroups.com<pylons-discuss%[email protected]>
> .
> To post to this group, send email to 
> pylons-discuss@googlegroups.**com<[email protected]>
> .
> Visit this group at 
> http://groups.google.com/**group/pylons-discuss?hl=en<http://groups.google.com/group/pylons-discuss?hl=en>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>
>
>


-- 
Vincent Catalano
Software Engineer and Web Ninja,
(520).603.8944

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


Reply via email to