askama
askama copied to clipboard
Type-safe, compiled Jinja-like templates for Rust
I18n
This (draft) PR gives an initial onset for localization (#202) by using [fluent-templates](https://github.com/XAMPPRocky/fluent-templates) to statically load all fluent translations. It is based on code of @kazimuth @djc Could you give...
I understand that Askama uses compiled templates but maybe is there a way to have a debug mode that renders the template when the page is loaded?
I was experimenting with switching a small project from using tera to askama. All went smoothly with one small exception: The tera templates contained some things like `{% if name['test']...
Using the latest release, we could write code like this (untested, from memory): ```jinja2 {{ foo.bar(value) }} {{ foo.bar(1) }} ``` ```rust #[derive(Template)] struct MyTemplate { foo: Foo, value: u32...
Inspired by concerns voiced in [this comment](https://github.com/rust-lang/rust/issues/84419#issuecomment-826415318) that askama has a bad edit cycle because it involves recompilation each time. Ideally, to solve this, one could have a second rendering...
Having an "embed" block like [twig has it](https://twig.symfony.com/doc/2.x/tags/embed.html), which is basically an "extend" but without an extra file, would be an awesome addition to the library I think. Is it...
In askama_shared/src/lib.rs#L36 this will cause the Template macro to fail if the `CARGO_MANIFEST_DIR` doesn't exist; This works well with the default rustc tool chain; however, this also means if for...
Hello, I would like to have two rendering stages of templates. One occurring at compile time (with a custom syntax) and the second occurring at run time (with default syntax)....
i'm trying to pass contents from sub templates but i have rendering error. here is the following template models, ``` #[derive(Template, Clone, Debug)] #[template(path = "pages/layout.html")] pub(crate) struct LayoutTemplate, pub(crate)...
A lovely feature would be to figure out how to recognize that an expression is a type that has derived Template, and then not escape its output (assuming both templates...