小数:

from __future__ import division

这样用“/”就能生成小数

 

forms:

1. views中的方法传递值给template.

  例如return render_response(request, '*.html',{'top_content':top_list,'module': 'audit',,"most_one":most_one})

2. 在template中利用

  变量用“{{     }}", 比如 {{ most_one }}    

  most_one[0]用作most_one.0 / most_one.key

3. 调用方法

  <th>{% for item in most_one.2 %}
                  <li>{{ item }}</li>

    {% endfor %} 【别忘了!】
            </th>

 

HTML:

<table>表示一个表格

<tr>标示这个表格中间的一个行,必须在一个<table></table>里面

<td>标示行中的一个列,需要嵌套在<tr></tr>中间

<th>...</th> 定义表头单元格,粗体等

 

<table> 
<tr> 
<td></td>  (<th>文字</th>,单元格名称)
<td></td> 
</tr> 
</teble>

  

相关文章:

  • 2021-09-17
  • 2021-10-19
  • 2021-05-25
  • 2021-05-31
  • 2021-12-27
  • 2022-12-23
  • 2021-10-14
  • 2021-09-20
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2021-11-09
  • 2021-09-26
  • 2021-11-10
  • 2021-10-24
  • 2022-12-23
相关资源
相似解决方案