Customize jinja parser
See original GitHub issueHey guys, I’m trying to use the cookiecutter to generate a code base for my k8s + Helm project. Helm uses “go templates” that has the same syntax like jinja templates, it causes conflicts, so I came up with a new feature… Jinja provides an ability to change it’s syntax by modifying the environment.
We can provide these parameters as object in cookiecutter.json
{
"_environment": {
"variable_start_string": "[[",
"variable_end_string": "]]"
}
}
WDYT?
Here is the PR #1089
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:13 (1 by maintainers)
Top Results From Across the Web
J2Live - Online Jinja2 Parser |
J2Live is a live Jinja2 parser/renderer, you give it template, ... it locally or go wild with adding filters customized to your use...
Read more >Jinja2 live parser
Jinja2 live parser. Template. Dear {{ name }}, {% if not asleep %} Once upon a time ... {% endif %}. Render. Dear·Jane,...
Read more >API — Jinja Documentation (3.1.x)
This will create a template environment with a loader that looks up ... the file system or a different location to avoid parsing...
Read more >Primer on Jinja Templating - Real Python
Create your first Jinja template; Render a Jinja template in Flask; Use for loops and conditional statements with Jinja; Nest Jinja templates ...
Read more >creating templates in Python with Jinja module - ZetCode
Jinja tutorial shows how to create templates in Python with Jinja module. AdvertisementsPython Jinja module. Jinja is a template engine for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi guys.
I cannot use cookiecutter for Ansible or Kubernetes, because it vary hard with
{% raw %}
block. Code in files with this block is unreadable. Custom jinja configuration will solve the problem.@wkerzendorf something is already possible with master version. Check already merged https://github.com/cookiecutter/cookiecutter/pull/1339