Ans:Django didn’t recognise your starting block tag, because you have a space between the { and the %.
需要把所有的{ % 换成{% ; % } 换成 %}。 就是2个符号必须连着,中间不能有空格或者换行!!!
另外,需要保持 for和endfor在同一行!! {% for temp_i,temp_v in df_port.items %} “{{ temp_i }}”, {% endfor %}
参考的stackoverflow链接:url=https://stackoverflow.com/questions/39935578/invalid-block-tag-endblock-did-you-forget-to-register-or-load-this-tag



