question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jinja2 environment settings

See original GitHub issue

Would it be possible to pass arguments to the underlying Jinja2 environment? I would like to activate the lstrip_blocks setting in the Jinja2 environment for more convenient whitespace trimming around code blocks. More about the Jinja API here: Jinja2 API

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
gtaylorcommented, Jan 28, 2018

I’d be looking to change jinja’s variable_start_string and variable_end_string to avoid colliding with something I’m templating.

1reaction
ramnescommented, May 30, 2020

Wow, three years later! What a personal record. Thank you @insspb, I didn’t have any hope left for this PR. And I could have done the work also, you just had to ask. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

API — Jinja Documentation (3.0.x)
The core component of Jinja is the Environment . It contains important shared variables like configuration, filters, tests, globals and others.
Read more >
Accessing OS environment variables from Jinja2 template
Where the appropriate environment variable can be set as: ... python -c 'import os import sys import jinja2 sys.stdout.write( jinja2.
Read more >
Environment Class — jinja2 documentation
The core component of Jinja is the Environment . It contains important shared variables like configuration, filters, tests, globals and others.
Read more >
jinja2.environment.Environment — Jinja2 API - GitHub Pages
The core component of Jinja is the Environment . It contains important shared variables like configuration, filters, tests, globals and others.
Read more >
API - Jinja2 Documentation
Jinja2 uses a central object called the template Environment. Instances of this class are used to store the configuration, global objects and are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found