2024-10-02 18:18:19 发布
网友
我查看了stackorverflow中的所有博客,但没有找到任何解决方案
Django Template - Increment the value of a variable
此链接解决方案不起作用。请告诉我其他的解决办法
我们可以这样做:
{% with value=0 %} {{ value }} {{ value|add:2 }} {% endwith %}
输出:
0 2
您可能需要阅读:Built-in template tags and filters
我们可以这样做:
输出:
您可能需要阅读:Built-in template tags and filters
相关问题 更多 >
编程相关推荐