Keats / tera

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

How to specify the number of cycles? #879

Closed sunkaifei closed 10 months ago

sunkaifei commented 10 months ago

How to specify the number of cycles? For example, I need to loop through the HTML template five times. It seems that querying documents now can only loop through arrays, which is very inconvenient

Keats commented 10 months ago

You can do {% for i in range(end=5) %

sunkaifei commented 10 months ago

Thank you