mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
update minijinja version
This commit is contained in:
@ -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"
|
||||
|
@ -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)
|
||||
});
|
||||
|
Reference in New Issue
Block a user