六、文章详情、点赞、评论

BBS论坛  文章详情、点赞、评论

BBS论坛  文章详情、点赞、评论

BBS论坛  文章详情、点赞、评论

 

 文章详情页面:

def article_detail(request, username, article_id):
    # user_obj  = models.UserInfo.objects.filter(username=username)
    article_obj = models.Article.objects.filter(pk=article_id).first()
    blog = models.Blog.objects.filter(userinfo__username=username).first()
    comment_list = models.Comment.objects.filter(article_id=article_id)
    return render(request, 'article_detail.html', locals())
views.py 文章详情页

相关文章: