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,