Here's an example:
from jinja2.sandbox import SandboxedEnvironment
env = SandboxedEnvironment()
env.from_string('foo bar {{ car }}').render(car='moo')
Yields:
'foo bar moo'
On Sunday, August 11, 2013 1:52:56 AM UTC-4, Derrik Bulmer wrote:
>
> my web portfolio is designed using some jinja 2. It is really alot like
> Django. I will study more on it some time
>
> On Thursday, March 7, 2013 8:48:17 AM UTC-8, [email protected] wrote:
>>
>> Are there any examples of the sandbox feature for jinja2 ?
>>
>> The docs are a bit hard to discern, and I couldn't find much online.
>>
>> I was hoping some people know of short, self contained, examples they can
>> point to.
>>
>
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" 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/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.