The language in the templates is not python, it is python-like so that
means python built-ins are not expected to be present.  To make python
built-ins present in every template, at startup, add any required
built-ins to the globals parameter when building the
jinja2.Environment.

http://jinja.pocoo.org/2/documentation/api#high-level-api

Robin

On Jun 25, 10:05 am, Matt Wilson <[email protected]> wrote:
> I wanted to do something like this in my jinja2 template:
>
> {% if isinstance(val, UUID) %}
>
> I could only get it to work when I passed in isinstance=isinstance in
> the render call.
>
> I've come across other missing builtin functions too.  What am I doing
> wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to