askama
askama copied to clipboard
Type-safe, compiled Jinja-like templates for Rust
Hi! 👋 I love Askama's pattern-matching syntax, with `match-when-else`. Would you be open to extending it to support the newly-stabilized [subslice patterns](https://blog.rust-lang.org/2020/03/12/Rust-1.42.html#subslice-patterns), too? It would help when matching against a...
The following simple template fails: ~~~~ {{ model.test ("test-from-model") }} ~~~~ Just by removing the whitespace between the `test` and `(...` solves the issue.
At the moment if the template deriving code is used in a module that uses `no_implicit_prelude`, the code fails to compile because it uses unqualified identifiers from `std`. The fix...
Go's [quicktemplate](https://github.com/valyala/quicktemplate) has a nice feature that opens a block in which all template statements behave like they would have been prefixed with `{%-` and `-%}`. (See the example bellow.)...
Use generic argument for `render_into` as opposed to `&mut dyn Write` (10% increase in performance)
I've done a little experiment and applied the following patch (the link bellow, and part of the patch at the end of this issue): * https://github.com/cipriancraciun/askama/commit/32ea386a2369a186e8ef83dc01e293502fc10050 Which basically changes `&mut...
I have some shared state where I'd like to take the lock, render the template and release the lock all ideally without too much stuff being copied around. For example:...
At the moment the if I have a sub-template that I want to render, which can't be included at compile time through the existing means, or if I have a...
If the template structure has some methods defined, they can't be accessed from the template. For example given the following template: ~~~~ {{ test("test-from-template") }} {{ model.test("test-from-model") }} ~~~~ And...
Hello, I'm using deprecated `_parent` feature and trying to get rid of it but I'm not sure how. I'm directly accessing fields on my parent template from both parent and...
Currently working with `Option`s can be rather frustrating and clumsy because of the lack of support for closures inside templates. Adding support for closures would significantly improve the library's usability.