Keats / tera

A template engine for Rust based on Jinja2/Django
http://keats.github.io/tera/
MIT License
3.44k stars 280 forks source link

Creating Custom Objects in Templates. #814

Closed PaulHMason closed 1 year ago

PaulHMason commented 1 year ago

Hopefully I'm just missing something obvious...

Is there any way of creating complex objects in Tera? Something like this:

{% set something = {
    one: 1,
    items: [1,2,3,4,5],
    two: {
        foo: "bar"
    }
} %}

Thanks

Keats commented 1 year ago

Not possible currently but will be added to v2 most likely.