当前日期格式化:
time.strftime(
'%Y-%m-%d',
time.
localtime(
time.
time()))
pprint:
import pprint
pp = pprint
.PrettyPrinter(indent=
4)
pp
.pprint(stuff)
或
import pprint
pprint
.pprint(stuff)
django 模板遍历dict:
{% for k,v in item.items %}
{{k}}{{v}}
{% endfor %}
编码:
\x ascii编码
\u unicode编码 decode('utf-8')
转载于:https://www.cnblogs.com/HeJD/p/8702032.html
相关资源:JAVA上百实例源码以及开源项目