oTree Forum >

Replacing Django templates in old code

#1 by StrangeQuark

I have an old application written by someone else which I want to port to Otree 5. It has several Django templates I need to replace, but I don't always know with what. Replacing "x|stringformat:"s"" with "x|c" appears to work, but what about this one:

{% with a="aaaa_"|add:j %}

I suppose this just adds j (a string variable) to the end of "aaaa_". However, just replacing the "|add" with "+" results in an error message. So what do I need to do?

Write a reply

Set forum username