Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make jinja_options a dict rather than ImmutaleDict #3190

Merged
merged 2 commits into from May 18, 2019

Conversation

@EtiennePelletier
Copy link
Contributor

commented May 7, 2019

This allows changing jinja environment options from the flask app:

app.jinja_options['undefined'] = jinja2.ChainableUndefined

The above example will be valid when Jinja2 v2.11 will be released (including pallets/jinja#997)

EtiennePelletier and others added some commits May 7, 2019

Make jinja_options a dict rather than ImmutaleDict
This allows changing jinja environment options from the flask app:
>>> app.jinja_options['undefined'] = jinja2.ChainableUndefined
use dict literal syntax for jinja_options
clarify docs about when jinja_options can be modified

@davidism davidism force-pushed the EtiennePelletier:jinja2-977 branch from ef43114 to 957f48a May 18, 2019

@davidism davidism added this to the 1.1.0 milestone May 18, 2019

@davidism davidism merged commit d0bfb06 into pallets:master May 18, 2019

12 checks passed

Flask Build #20190518.1 succeeded
Details
Flask (Flask DocsHtml) Flask DocsHtml succeeded
Details
Flask (Flask Pypy3Linux) Flask Pypy3Linux succeeded
Details
Flask (Flask Python27Linux) Flask Python27Linux succeeded
Details
Flask (Flask Python27Windows) Flask Python27Windows succeeded
Details
Flask (Flask Python35Linux) Flask Python35Linux succeeded
Details
Flask (Flask Python36Linux) Flask Python36Linux succeeded
Details
Flask (Flask Python37Linux) Flask Python37Linux succeeded
Details
Flask (Flask Python37Mac) Flask Python37Mac succeeded
Details
Flask (Flask Python37Windows) Flask Python37Windows succeeded
Details
Flask (Flask VersionRange) Flask VersionRange succeeded
Details
Flask (FlaskOnNightly) FlaskOnNightly succeeded
Details

@EtiennePelletier EtiennePelletier deleted the EtiennePelletier:jinja2-977 branch May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.