一个测试文章
2011-01-31 12:16 sunblackshine 阅读(232) 评论(3) 编辑 收藏 举报一个测试文章
用 WIndows Live Writer 编写的。
def blogs(request, username=None, template_name="blog/blogs.html"): blogs = Post.objects.filter(status=2).select_related(depth=1).order_by("-publish") if username is not None: user = get_object_or_404(User, username=username.lower()) blogs = blogs.filter(author=user) return render_to_response(template_name, { "blogs": blogs, }, context_instance=RequestContext(request))
![微笑](https://images.cnblogs.com/cnblogs_com/sunblackshine/201101/201101311215364599.png)
![转动眼睛](https://images.cnblogs.com/cnblogs_com/sunblackshine/201101/201101311215373552.png)
![相爱](https://images.cnblogs.com/cnblogs_com/sunblackshine/201101/201101311215376094.png)