Hi everybody,
sorry, my last email was premature. I've gotten it to work like this:
from pyramid.renderers import render
render(proj:templates/email/_event.html, context, request=request)
So manually providing the asset-specification 'proj:templates' again seems
to do the trick.
Am
Hi all,
in our current project we are using jinja with the pyramid_jinja2-package
and have defined the search-path in __init__.py as usual:
config.add_jinja2_search_path('proj:templates', name='.html')
Now I need to use that renderer/jinja-environment to render a file-template
to a string
Hmm, in theory it's supposed to fallback to the search path but try
the asset spec first. If you could add a reproducible example to an
issue I'd be happy to take a look.
On Tue, Jul 7, 2015 at 2:18 PM, Martin Stein mstein.m...@gmail.com wrote:
Hi everybody,
sorry, my last email was premature.
I've narrowed the issue down. The problem occurs when the template is
located in a sub-directory of templates, but I'm guessing that the mistake
is on my side. I've added an example here:
https://github.com/martinstein/pyramid_jinja_issue/tree/master/pyramid_jinja_issue
The relevant lines are:
Have you tried: email/mytemplate.html
--
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+unsubscr...@googlegroups.com.
To post to this group, send