diff options
author | Thomas Feldmann <mail@tfeldmann.de> | 2022-02-11 15:58:53 +0100 |
---|---|---|
committer | Thomas Feldmann <mail@tfeldmann.de> | 2022-02-11 16:02:55 +0100 |
commit | d82956e69797c3f56fb30f4c07b430ded14d911e (patch) | |
tree | d5c25f886f1b7a8621dd38fcc5d526bf022825c9 | |
parent | 41b20881f53968a0cacd06ef140e5297519e666e (diff) |
placeholder update
-rw-r--r-- | docs/updating-from-v1.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/updating-from-v1.md b/docs/updating-from-v1.md index 56a7187..5ad3d84 100644 --- a/docs/updating-from-v1.md +++ b/docs/updating-from-v1.md @@ -26,22 +26,22 @@ placeholders. - `{basedir}` is no longer available. - You have to replace undocumented placeholders like this: -```python -{created.year}-{created.month:02}-{created.day:02} +```yaml +"{created.year}-{created.month:02}-{created.day:02}" ``` With this: -```python -{created.strftime('%Y-%m-%d')} +```yaml +"{created.strftime('%Y-%m-%d')}" ``` If you need to left pad other numbers you can now use the following syntax: -```python -{ "{:02}".format(your_variable) } +```yaml +"{'%02d' % your_variable}" # or -{ '%02d' % your_variable } +"{ '{:02}'.format(your_variable) }" ``` ## Filters |