File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ but it does not implement all of their features and takes a different approach t
30
30
31
31
Main diffrences from Jinja2 and Django Templates:
32
32
33
- - filter are not supported, and there is no plan to support them
33
+ - filters are not supported, and there is no plan to support them
34
34
- all variables passed inside context must be accessed using the ``context `` object
35
35
- you can call methods inside templates just like in Python
36
36
- no support for nested blocks, although inheritance is supported
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ It is up to the user to decide which method is more suitable for a given use cas
27
27
**Generally, the first method will be sufficient for most use cases. **
28
28
29
29
It is also worth noting that compiling all used templates using the second method might not be possible,
30
- depending one the project and board used, due to the limited amount of RAM.
30
+ depending on the project and board used, due to the limited amount of RAM.
31
31
32
32
.. literalinclude :: ../examples/templateengine_reusing.py
33
33
:caption: examples/templateengine_reusing.py
@@ -51,7 +51,7 @@ Every expression that would be valid in an f-string is also valid in the templat
51
51
This includes, but is not limited to:
52
52
53
53
- mathemathical operations e.g. ``{{ 5 + 2 ** 3 }} `` will be replaced with ``"13" ``
54
- - string operations e.g. ``{{ 'hello'.title () }} `` will be replaced with ``"Hello " ``
54
+ - string operations e.g. ``{{ 'hello'.upper () }} `` will be replaced with ``"HELLO " ``
55
55
- logical operations e.g. ``{{ 1 == 2 }} `` will be replaced with ``"False" ``
56
56
- ternary operator e.g. ``{{ 'ON' if True else 'OFF' }} `` will be replaced with ``"ON" ``
57
57
- built-in functions e.g. ``{{ len('Adafruit Industries') }} `` will be replaced with ``"19" ``
@@ -253,6 +253,7 @@ and in all ``Template`` constructors.
253
253
254
254
.. literalinclude :: ../examples/autoescape.md
255
255
:caption: examples/autoescape.md
256
+ :lines: 5-
256
257
:language: markdown
257
258
:linenos:
258
259
You can’t perform that action at this time.
0 commit comments