Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from askama to rinja #227

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plotly/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ kaleido = ["plotly_kaleido"]
plotly_ndarray = ["ndarray"]
plotly_image = ["image"]
wasm = ["getrandom", "js-sys", "wasm-bindgen", "wasm-bindgen-futures"]
with-axum = ["askama/with-axum", "askama_axum"]
with-axum = ["rinja/with-axum", "rinja_axum"]

[dependencies]
askama = { version = ">=0.11.0, <0.13.0", features = ["serde-json"] }
askama_axum = { version = "0.4.0", optional = true }
rinja = { version = "0.3", features = ["serde_json"] }
rinja_axum = { version = "0.3.0", optional = true }
dyn-clone = "1"
erased-serde = "0.4"
getrandom = { version = "0.2", features = ["js"], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion plotly/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//!
//! A plotting library for Rust powered by [Plotly.js](https://plot.ly/javascript/).
#![recursion_limit = "256"] // lets us use a large serde_json::json! macro for testing crate::layout::Axis
extern crate askama;
extern crate rand;
extern crate rinja;
extern crate serde;

#[cfg(all(feature = "kaleido", feature = "wasm"))]
Expand Down
2 changes: 1 addition & 1 deletion plotly/src/plot.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::{fs::File, io::Write, path::Path};

use askama::Template;
use dyn_clone::DynClone;
use erased_serde::Serialize as ErasedSerialize;
use rand::{
distributions::{Alphanumeric, DistString},
thread_rng,
};
use rinja::Template;
use serde::Serialize;

use crate::{Configuration, Layout};
Expand Down
Loading