aboutsummaryrefslogtreecommitdiffstats
path: root/askama_iron
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-01-28 22:49:04 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-01-29 09:25:59 +0100
commitff24eef1ff7dcf3849fd1e6d9efec0de2bc57005 (patch)
treedb3a606f7cf88b6a932484c799a441cab9dd7996 /askama_iron
parent75f32d3967e4d13b86b0d720ebc808c6fd9caa05 (diff)
downloadaskama-ff24eef1ff7dcf3849fd1e6d9efec0de2bc57005.tar.gz
askama-ff24eef1ff7dcf3849fd1e6d9efec0de2bc57005.tar.bz2
askama-ff24eef1ff7dcf3849fd1e6d9efec0de2bc57005.zip
Move Iron integration into a separate askama_iron crate
Diffstat (limited to '')
-rw-r--r--askama_iron/Cargo.toml17
-rw-r--r--askama_iron/src/lib.rs3
-rw-r--r--askama_iron/templates/hello.html (renamed from testing/templates/hello.txt)0
-rw-r--r--askama_iron/templates/hello.txt1
-rw-r--r--askama_iron/tests/basic.rs (renamed from testing/tests/iron.rs)1
5 files changed, 21 insertions, 1 deletions
diff --git a/askama_iron/Cargo.toml b/askama_iron/Cargo.toml
new file mode 100644
index 0000000..35c585d
--- /dev/null
+++ b/askama_iron/Cargo.toml
@@ -0,0 +1,17 @@
+[package]
+name = "askama_iron"
+version = "0.9.0"
+authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"]
+description = "Iron integration for Askama templates"
+documentation = "https://docs.rs/askama"
+keywords = ["markup", "template", "jinja2", "html"]
+categories = ["template-engine"]
+homepage = "https://github.com/djc/askama"
+repository = "https://github.com/djc/askama"
+license = "MIT OR Apache-2.0"
+workspace = ".."
+edition = "2018"
+
+[dependencies]
+askama = { version = "0.9.0", path = "../askama", features = ["with-iron"] }
+iron = { version = ">= 0.5, < 0.7" }
diff --git a/askama_iron/src/lib.rs b/askama_iron/src/lib.rs
new file mode 100644
index 0000000..37e79cc
--- /dev/null
+++ b/askama_iron/src/lib.rs
@@ -0,0 +1,3 @@
+pub use askama::*;
+
+pub use iron::{headers::ContentType, modifier::Modifier, Response};
diff --git a/testing/templates/hello.txt b/askama_iron/templates/hello.html
index 8149be7..8149be7 100644
--- a/testing/templates/hello.txt
+++ b/askama_iron/templates/hello.html
diff --git a/askama_iron/templates/hello.txt b/askama_iron/templates/hello.txt
new file mode 100644
index 0000000..8149be7
--- /dev/null
+++ b/askama_iron/templates/hello.txt
@@ -0,0 +1 @@
+Hello, {{ name }}!
diff --git a/testing/tests/iron.rs b/askama_iron/tests/basic.rs
index f58a609..32ca839 100644
--- a/testing/tests/iron.rs
+++ b/askama_iron/tests/basic.rs
@@ -1,4 +1,3 @@
-#![cfg(feature = "iron")]
use askama::Template;
use iron::{status, Response};