Skip to content

Pass the Jinja env to allow changing the variable_*_string values#1666

Open
mreguero wants to merge 5 commits intocookiecutter:mainfrom
mreguero:bugfix/jinja_variable
Open

Pass the Jinja env to allow changing the variable_*_string values#1666
mreguero wants to merge 5 commits intocookiecutter:mainfrom
mreguero:bugfix/jinja_variable

Conversation

@mreguero
Copy link
Copy Markdown

In the current master branch you can pass a dict to the variable "_jinja2_env_vars" to customize the Jinja Environment, among other things this allows you to change "variable_start_string" and "variable_end_string" which defaults to "{{" and "}}" respectively, however those were left as hard coded values in a couple of functions which prevented the usage of any other value for these 2 settings.

Fake Project
============

Blah!!!!
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this fake repo needed, it seems nearly identical to the first. What case is it covering that pre3 does not?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pre-existing test used 2 fake repos so I just replicated the same thing to show it works the same, I can remove one of them if it was unnecessary

Co-authored-by: Andrew Tribone <780132+att14@users.noreply.github.com>
@ericsouza
Copy link
Copy Markdown

I really need this feature, congrats! Hoping to be merged soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants