Comments (4)
Hey @iainelder, I think we'd all be happy to review a PR that clarifies our docs on this subject. I'd say put up a draft and we can engage with you about wording from there.
from sceptre.
These examples aren't helping me much, although I would welcome them as a PR that adds unit tests that illustrate the confusing behaviour. I did follow the links to @zaro0508 's comment here
https://github.com/orgs/Sceptre/discussions/1238#discussioncomment-2891480
Probably we also just need to make it clearer in the docs that there might be scenarios where you want to add
j2_environment:
autoescape: False
?
from sceptre.
Probably we also just need to make it clearer in the docs
In the v4.3.0 docs the StackGroup Config page has the only discussion of j2_environment
. It doesn't mention autoescape
at all.
I think Jinja2 templates deserve their own page. That seems like the right place to detail the j2_environment
setting and give enough examples to make it clear. One of the examples should show where you would want to control the autoescape
setting, We need to call all out any gotchas such as the different default behaviors of the file
and http
template types.
These examples aren't helping me much
I'll grant that the output from the examples isn't clear without reading the code. The point there was to have a way to reproduce the behavior and to rule out possible PEBKAC errors and check my own understanding. Some of them might be helpful in the documentation, and the rest can be thrown away.
I would welcome them as a PR that adds unit tests that illustrate the confusing behaviour
I wouldn't bother yet. Only a developer would think to look there. The main problem here is a general lack of documentation on the Jinja2 templating feature.
I think there's a bug in here somewhere, but the behavior might be deliberate. I'd like to understand the spec before nailing things down with tests.
from sceptre.
@iainelder What kind of docs do you propose in this project that do not overlap with what is already documented in https://jinja.palletsprojects.com/en/3.1.x/
Compare the Jinja2 docs in Ansible
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_templating.html
It largely just redirects you to the official Jinja2 docs. I think that's similar here?
https://docs.sceptre-project.org/dev/docs/templates.html
from sceptre.
Related Issues (20)
- python < 3.12 causes issues with other poetry projects, can you use < 4.0 HOT 3
- Autocompletion docs need updating for bash
- Stack outputs in stack groups hide the stack names HOT 5
- Unable to install Sceptre >= 4.0 since release of cython 3.0.0 HOT 15
- inheretance behavior of `profile` overrides child with parent config HOT 5
- Add a Makefile HOT 1
- Why does black use Python 3.10? HOT 2
- announcements to twitter (X) is broken HOT 4
- Drop support for Python 3.7 HOT 4
- test_hook_writes_to_stderr failure "/bin/sh command not found" HOT 4
- Not enough values to unpack given a badly formatted stack ref
- Bug in hooks test on MacOS HOT 2
- Setup build workflow without secrets HOT 2
- Provide a formatted_yaml template handler HOT 1
- CI: make integration tests run faster HOT 5
- Stack differ raises AttributeError if a values is a bool
- Input parameters should be validated
- Cyclic dependencies should result in a clearer error message
- j2_environment extensions not available while generating config HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sceptre.