Hi,Although documented 'Caller-Relative Template Lookup' doesn't seem to be working with pyramid_mako.
Given a project created with the 'alchemy' scaffold:
- replacing 'pyramid_chameleon' with 'pyramid_mako'
- adjusting the renderer of the my_view(request) from
@view_config(route_name='home', renderer='templates/mytemplate.pt')
def my_view(request):
to
@view_config(route_name='home', renderer='templates/mytemplate.mako')
def my_view(request):
results in:
mako.exceptions.TopLevelLookupException: Cant locate template for
uri 'templates/mytemplate.mako'
This was already reported two years ago in:
https://groups.google.com/d/topic/pylons-discuss/wgQFAnnNMaQ/discussion
Prepending the renderer with a slash doesn't help.
Using an asset specification however does work. So does setting
'mako.directories = mypkg:templates'. But those are not as convenient as
using 'Caller-Relative Template Lookup'.
Does someone happen to have a fix for this available or is someone working on a fix?
-- Guido Kollerie
signature.asc
Description: OpenPGP digital signature
