Nested For Loop in Jinja2

后端 未结 1 1099
再見小時候
再見小時候 2020-12-18 09:02

I am making a nested for loop in Jinja / Python Flask.

If I hard code the values, then it works fine. Am I missing something in the Jinja template?

         


        
1条回答
  •  醉酒成梦
    2020-12-18 09:53

    Figured it out...

    
        {% for column in Columns %}
            
        {% endfor %}
    
    
           {% for row in rows %}
               
                    {% for column in Columns %}
                        
                    {% endfor %}
               
           {% endfor %}
    
    
    {{ column }}
    {{ row[column] }}

    0 讨论(0)
提交回复
热议问题