Vincent Prouillet
Vincent Prouillet
Not currently but this is something I'm thinking of adding for v2, I'm working on block support for it and will likely do a render_block fn anyway internally so it...
That's not planned and won't be added, it would be too messy since changes in any templates can affect other templates
How do you envision this to work? I don't see how that would be clean but maybe I don't understand it
I wouldn't spent time implementing it, Tera v2 doesn't have an AST anymore (well it has a temporary one) so that would be completely different work that cannot be reused....
No way to do that, macros are pure functions
You need to pass the actual timestamp you want to format, not the object. So something like `{{ last_used.secs_since_epoch | date }}`
You can format the timestamp in a given timezone/format with the `date` filter. You can also use the locale with the https://github.com/Keats/tera/blob/master/Cargo.toml#L49 feature enabled
serde_json doesn't support u128 (well JSON doesn't) so you would have to remove that field from the struct
Looks like you need to enable the "arbitrary_precision" to support u/i128? which means all numbers will now be represented as strings and would be a big breaking change.
> For example the value 334916158057069523337570811379465810500 renders as 334916158057069530000000000000000000000. That's because Tera itself doesn't use that feature and by default serde_json only supports up to u64. While we keep using...