Le 01/06/2011 09:14, Alan a écrit :
I have a pretty cool idea in mind for a way to power Ajax. A large
part of it would be the extraction of blocks from a rendered template.
I noticed in the docs that this seems to be the point of
jinja2.runtime.Context.blocks, but I’m not sure how this would
actually help me in real life. Typically I am just outputting the
results of `.render()` on a template object.
How can I render a page and then get access to this computed dict of
blocks?
Hi,
Try these methods:
http://jinja.pocoo.org/docs/api/#jinja2.Template.module
http://jinja.pocoo.org/docs/api/#jinja2.Template.make_module
http://jinja.pocoo.org/docs/api/#jinja2.Template.blocks
Regards,
--
Simon Sapin
--
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.