About 53 results
Open links in new tab
  1. What does this "-" in jinja2 template engine do? - Stack Overflow

    Aug 5, 2012 · What does this "-" in jinja2 template engine do? Asked 13 years, 3 months ago Modified 3 years ago Viewed 33k times

  2. Get lengths of a list in a jinja2 template - Stack Overflow

    jinja2's builtin filters are documented here; and specifically, as you've already found, length (and its synonym count) is documented to: Return the number of items of a sequence or mapping. …

  3. jinja2 - How do you test if a variable is undefined? - Stack Overflow

    From the Jinja2 template designer documentation: {% if variable is defined %} value of variable: {{ variable }} {% else %} variable is not defined {% endif %}

  4. How to use conditional if statements in Jinja 2? - Stack Overflow

    So I am new to Django and can use some help. I have used a for loop to display a list from my database. But I want to add an if statement such that, if the user input matches my database …

  5. Escape jinja2 syntax in a jinja2 template - Stack Overflow

    Aug 18, 2014 · I serve dynamic pages from Jinja2 templates in Flask. Now I am defining client-side templates in say, Jinja2-clone Nunjucks inside a script tag. Problem is, the client-side …

  6. How to pass selected, named arguments to Jinja2's include context?

    Using Django templating engine I can include another partial template while setting a custom context using named arguments, like this: {% include "list.html" with articles=articles_list1 only …

  7. jinja2 - What dashes mean in jinja templates? - Stack Overflow

    Turns out that + and - are there for whitespace control purpose. You can manually disable the lstrip_blocks behavior by putting a plus sign (+) at the start of a block [...] You can also strip …

  8. Is Jinja a superset of the Django template language?

    Jun 29, 2024 · Django to Jinja2 templates are slightly different in method calls, condition, filter arguments and test are slightly different Well most of the syntax elements look and work the …

  9. How to load jinja template directly from filesystem

    The jinja API document at pocoo.org states: The simplest way to configure Jinja2 to load templates for your application looks roughly like this: from jinja2 import Environment, …

  10. ImportError: cannot import name 'Markup' from 'jinja2'

    Mar 28, 2022 · I tried updating Jinja2 but that didn't fix the issue. For some, simply updating (or uninstall and install) jinja2 and Flask works. However, the root problem is a 'pending' PR (pull …