Askama was on my list to check out. Presumably in ...
# rust-htmx
a
Askama was on my list to check out. Presumably in Askama you have to use template looping constructs etc? I was thinking of something akin to this pseudocode-ish:
Copy code
rust
#[derive(Serialize)]
struct Todo {
  id: usize,
  content: String,
  .. etc
}

fn axum_handler() -> impl IntoResponse {
    // probably passed in as State
    let se = serde_htmx::Builder::new()
     .div_container()
     .css_class("class-name")
     .build();

   let todos = query_todos();

   Html(se.to_html(todos))
}
The serializer would take care of creating
<ul><li></li></ul>
etc (defaults + config if required). No template syntax needed. Is something like that possible with Askama?
10 Views