2019-02-15 django template for r

2019-02-15  本文已影响0人  多吃水果少吃肉
<!-- Iterate N times (replace N with a number -->
{% for i in "x"|ljust:"N" %}
    <!-- Access numeric variable (0-based index) -->
    {{ forloop.counter0 }}
    
    <!-- Access numeric variable (1-based index) -->
    {{ forloop.counter }}
{% endfor %}

<!-- For example, iterate from 0 to 3 -->
{% for i in "x"|ljust:"3" %}
    <!-- Do stuff -->
{% endfor %}

https://gist.github.com/wachunei/f7f1bb9bca0a74bb1053

上一篇 下一篇

猜你喜欢

热点阅读