Django
iteye_2042
这个作者很懒,什么都没留下…
展开
-
django template: 输出js数组加逗号的问题
Django template输出js数组时: [quote]{% for val in list %} {{ val }}, {% endfor %} [/quote] 这样会导致最后一个元素也带逗号,在IE6上会报js错误。 [quote]{% for val in list %} {% if not forloop.first %}, {% endif %} {{ val...原创 2012-10-10 21:05:47 · 207 阅读 · 0 评论 -
django上的静态文件
django里使用静态文件,貌似有这么几种办法: 1. 在setting.py里面: [code="python"] # URL prefix for static files. # Example: "http://media.lawrence.com/static/" STATIC_URL = '/static/' STATICFILES_DIRS = ( # P...2012-12-05 22:02:43 · 79 阅读 · 0 评论