1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

update minijinja version

This commit is contained in:
Rob Ede
2023-07-09 00:56:56 +01:00
parent e96b9aeccc
commit dbfa486897
12 changed files with 349 additions and 65 deletions

View File

@ -10,5 +10,5 @@ actix-utils.workspace = true
env_logger.workspace = true
log.workspace = true
minijinja = { version = "0.30", features = ["source"] }
minijinja-autoreload = "0.30"
minijinja = { version = "1", features = ["loader"] }
minijinja-autoreload = "1"

View File

@ -9,6 +9,7 @@ use actix_web::{
web, App, FromRequest, HttpRequest, HttpResponse, HttpServer, Responder, Result,
};
use actix_web_lab::respond::Html;
use minijinja::path_loader;
use minijinja_autoreload::AutoReloader;
struct MiniJinjaRenderer {
@ -91,7 +92,7 @@ async fn main() -> std::io::Result<()> {
notifier.watch_path(&tmpl_path, true);
}
env.set_source(minijinja::Source::from_path(tmpl_path));
env.set_loader(path_loader(tmpl_path));
Ok(env)
});