编译环境: Windows7+Ecliplse+Django
1 <table border="1"> 2 <thead> 3 <tr> 4 <th>用户名</th> 5 <th>密码</th> 6 </tr> 7 </thead> 8 <tbody> 9 10 {% for line in data %} 11 <tr> 12 <td> {{ line.user}} </td> 13 <td> {{ line.pwd }}</td> 14 </tr> 15 {% endfor %} 16 17 </tbody> 18 </table>
解决方法就是在<th>外面加<tr>.
原文:http://www.cnblogs.com/v-BigdoG-v/p/7455703.html