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

Generic default value #280

Open
pgeiem opened this issue Nov 9, 2023 · 0 comments
Open

Generic default value #280

pgeiem opened this issue Nov 9, 2023 · 0 comments

Comments

@pgeiem
Copy link

pgeiem commented Nov 9, 2023

Currently, when trying to access an inexistent value from a template the full rendering throw an exception.
In some case with large template it would be interesting to render the template even if there is any not found values.
The not found values could then be rendered as empty string or fixed constant.

Today to get this behaviour we have to explicitly use the default function for every single variable in the template.
This could be added as an option to Environment such as set_throw_at_missing_includes

Is there any possibilities to add this function ?

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

No branches or pull requests

1 participant