askama icon indicating copy to clipboard operation
askama copied to clipboard

Type-safe, compiled Jinja-like templates for Rust

Results 175 askama issues
Sort by recently updated
recently updated
newest added

Relevant dependencies: ```toml askama = { version = "0.10.5", features = ["with-rocket"] } askama_rocket = "0.11.0-rc.1" rocket = "0.5.0-rc.1" ``` First template derive that fails: ```rust #[derive(Template)] #[template(path = "index.html")]...

For example, if you define `{+` as `expr_start`, then it would be ignored because `askama` already handles it internally meaning it cannot be overloaded. Currently it is silently ignored. Emitting...

It would be useful to have mutable local variables. With `{{ let mut foo }}` syntax maybe? The idea originates in the @djc comment: https://github.com/djc/askama/issues/669#issuecomment-1104853641

This is just a quick fix to address #667, and open up discussion. Should we take any assumptions about interior mutability, statics and side-effects? i.e. never cache calls. Someone could...

It uses value of the first method call instead of calling the method each time. E.g. ```rust use askama::Template; use rand::prelude::*; #[derive(Template)] #[template( source = "{{ rnd.gen() }} {{ rnd.gen()...

Hi - I have a common template which renders a sortable table header. In a larger template I want to call it and pass in the context (e.g. name, whether...

I'd like to iterate over a bunch of DynTemplate objects, saving each rendering to a path derived from the source path. The easiest way that came to mind was adding...

When I try to include a template that contains a `block` definition from another template, I get the error below. ```rust use askama::Template; #[derive(Template)] #[template(path = "index.html")] struct IndexTemplate src/main.rs:3:10...

Is it possible to do quick-and-dirty string slices in a template? ```jinja2 {{ &t.token[0..10] }} ``` is giving me ```rust error: problems parsing template source at row 16, column 35...

I might be missing something but wouldn't using io::Write allow to write into a file directly?