From 4ccac4f5d08e1d4522205abd68330305a21b0ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ma=C4=87kowski?= Date: Wed, 21 Jan 2026 22:16:14 +0100 Subject: [PATCH] chore: use cot::Template instead of askama::Template in guide --- src/md-pages/master/error-pages.md | 2 +- src/md-pages/master/templates.md | 2 +- src/md-pages/v0.5/error-pages.md | 2 +- src/md-pages/v0.5/templates.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/md-pages/master/error-pages.md b/src/md-pages/master/error-pages.md index c9c331e..db45ff9 100644 --- a/src/md-pages/master/error-pages.md +++ b/src/md-pages/master/error-pages.md @@ -32,10 +32,10 @@ When the debug mode is disabled, Cot provides default error pages that do not sh Let's implement a custom error handler in your project: ```rust -use askama::Template; use cot::html::Html; use cot::response::{IntoResponse, Response}; use cot::error::handler::{DynErrorPageHandler, RequestError}; +use cot::Template; async fn error_page_handler(error: RequestError) -> cot::Result { #[derive(Template)] diff --git a/src/md-pages/master/templates.md b/src/md-pages/master/templates.md index a559ddd..982c4f0 100644 --- a/src/md-pages/master/templates.md +++ b/src/md-pages/master/templates.md @@ -297,7 +297,7 @@ To display custom types in Askama templates, the type must implement `Display`. ```rust use std::fmt::Display; -use askama::Template; +use cot::Template; struct Item { title: String, diff --git a/src/md-pages/v0.5/error-pages.md b/src/md-pages/v0.5/error-pages.md index c9c331e..db45ff9 100644 --- a/src/md-pages/v0.5/error-pages.md +++ b/src/md-pages/v0.5/error-pages.md @@ -32,10 +32,10 @@ When the debug mode is disabled, Cot provides default error pages that do not sh Let's implement a custom error handler in your project: ```rust -use askama::Template; use cot::html::Html; use cot::response::{IntoResponse, Response}; use cot::error::handler::{DynErrorPageHandler, RequestError}; +use cot::Template; async fn error_page_handler(error: RequestError) -> cot::Result { #[derive(Template)] diff --git a/src/md-pages/v0.5/templates.md b/src/md-pages/v0.5/templates.md index a559ddd..982c4f0 100644 --- a/src/md-pages/v0.5/templates.md +++ b/src/md-pages/v0.5/templates.md @@ -297,7 +297,7 @@ To display custom types in Askama templates, the type must implement `Display`. ```rust use std::fmt::Display; -use askama::Template; +use cot::Template; struct Item { title: String,