摘要: 使用模板在blog目录下建立templates文件夹(名字不能错),在其中建立archive.html文件作为页面显示{%for post in posts%}<h2>{{post.title}}</h2><p>{{post.timestamp|date:"l,F jS"}}</p><p>{{post.body}}</p>{%endfor%}在blog/view.py中建立url响应处理from django.template import loader,Contextfrom django.http 阅读全文
posted @ 2013-04-14 23:39 看天空变黑 阅读(221) 评论(0) 推荐(0) 编辑