Commit 330bb2d
authored
Move cookiecutter filters to a Jinja2 extension (#143)
Move cookiecutter filters to a Jinja2 extension
By using a full fledged Jinja2 extension we can not only add filters but
also variables. This also simplifies the `cookiecutter.json` file, as we
don't need to enumerate every single filter we want to use. This also
simplifies the template update process as when new fitlers are added
there is no need to update the cookiecutter replay file, also minimizing
chances of weird erros when that happens.
Also make sure we don't override existing filters, so we need to rename
`title` as it was overriding the `title` built-in filter.File tree
3 files changed
+261
-233
lines changed- cookiecutter
3 files changed
+261
-233
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 26 | + | |
35 | 27 | | |
36 | 28 | | |
0 commit comments