Thanks for the reply. I see that the "set" tag is able to change context. I would be happy to change my local copy of Jinja2 to add a "code" tag that works similar to "set" tag. Can you point me the location in source that I need to look at for achieving this please?
On Wed, Jan 25, 2012 at 6:24 PM, Armin Ronacher <[email protected] > wrote: > Hi, > > > On 2012-01-24 3:14 PM, Prashanth Ellina wrote: > >> I wrote an extension based on the example on the docs. I am able to >> access the context by using the contextfunction decorator but it is >> immutable. >> > That's because the context in Jinja2 is a data source not a data store. > There is no functionality in Jinja2 that would enable the modification of > the context since compiler optimizations disable this. > > However there are some hooks that circumvent this for template includes > but it's not generally available for extensions so far. This will > eventually change when I get around cleaning up the scoping scope. > > > Regards, > Armin > > > -- > You received this message because you are subscribed to the Google Groups > "pocoo-libs" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to pocoo-libs+unsubscribe@** > googlegroups.com <pocoo-libs%[email protected]>. > For more options, visit this group at http://groups.google.com/** > group/pocoo-libs?hl=en <http://groups.google.com/group/pocoo-libs?hl=en>. > > -- You received this message because you are subscribed to the Google Groups "pocoo-libs" 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/pocoo-libs?hl=en.
