Django TemplateSyntaxError Could not parse the remainder: '()'
2016-06-12 23:32
363 查看
返回的数据是列表集合,如
在模板中使用方式如下:
参考见:
http://stackoverflow.com/questions/5231171/django-templatesyntaxerror-could-not-parse-the-remainder
n [5]: a = set() In [6]: a.add((1, 3)) In [7]: a Out[7]: {(1, 3)}
在模板中使用方式如下:
{% for archive in archive_lists %} <li> <a href="/archive/{{ archive.0 }}/{{ archive.1 }} ">{{ archive }}</a> </li> {% endfor %}
参考见:
http://stackoverflow.com/questions/5231171/django-templatesyntaxerror-could-not-parse-the-remainder
相关文章推荐
- main方法的参数
- setCentralWidget就可以把Qwidget设置为QMainWindow的主窗口
- 如何在OS X El Captain中配置GLFW和GLEW
- saiku 3.7.4 构建过程
- aiRPC(远程调用工具)
- mybaits-config.xml
- RAID阵列
- Leetcode-11. Container With Most Water
- HDU 1787 GCD Again
- [Hadoop]Hadoop Training Roadmap
- SICP 习题2.17 last-pair 找出表的最后一个值
- hdfs.DFSClient: Failed to close file 解决办法
- svn cleanup failed–previous operation has not finished 解决方法
- solution Of 1106. Lowest Price in Supply Chain (25)
- mybaits中#和$的区别
- aircrack-ng工具学习记录(一)
- Coping with the TCP TIME-WAIT state on busy Linux servers
- TIME-WAIT 快速回收
- Golang import、init()、main()
- “不支持一个STA线程上针对多个句柄的WaitAll。”的解决方案