I'm trying to pick up a value from a list randomly in jinja2, this way:
It selects an element randomly, but it reuses it every next time. If I change something in my template, then it picks up a different number again.
But weirdly, if I use range, it works just fine:
Any ideas of how I can pick a random item from a fixed list without having to create my own filters?
Any help is appreciated! thanks :)
Aucun commentaire:
Enregistrer un commentaire