Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

Import a Python module into a Jinja template?

Is it possible to import a Python module into a Jinja template so I can use its functions? For example, …

python jinja2 python-import
Flask: current page in request variable

In a template, how do I get what page I'm currently on? I'd rather not pass a variable like page , …

flask jinja2
What do the chars %7D mean in an url query?

If I access my webapp with the url /vi/5907399890173952.html then it works but when I look in the log …

python google-app-engine url jinja2 webapp2
Getting a request parameter in Jinja2

How can I retrieve a request param a in Jinja2 template? http://foo.bar?a=1

python flask jinja2
How do I access part of a list in Jinja2

I'm trying to use the jinja2 templating langauge to return the last n(say, 5) posts in my posts list: {% for …

python templates jinja2
How to use logic operators in jinja template on salt-stack (AND, OR)

I am using a jinja template to generate a state file for salt. I added some conditionals and would like …

jinja2 salt-stack
Using utf-8 characters in a Jinja2 template

I'm trying to use utf-8 characters when rendering a template with Jinja2. Here is how my template looks like: <!…

python python-2.7 utf-8 character-encoding jinja2
Length of string in Jinja/Flask

Jinja unfortunately does not support executing arbitrary Python code, such as {% if len(some_var)>1 %} ... {% endif %} My current workaround …

python flask jinja2
Does PyCharm support Jinja2?

A bottle project of mine uses Jinja2. PyCharm does not automatically recognize it and shows such lines as errors. Is …

python jinja2 pycharm
Is it possible to perform Includes with flask?

Say I have a template layout saved in template.html. This template includes a banner, side navigation, content container, and …

html templates flask jinja2 ssi