提交评论功能
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import json
|
||||
|
||||
from django.shortcuts import render
|
||||
from server.models import Task,StudentandTercher
|
||||
from server.models import Task,StudentandTercher,Comment
|
||||
from server_auth.models import MindUser
|
||||
|
||||
|
||||
@@ -21,6 +21,14 @@ def to_baiban(request):
|
||||
"path": test_date}
|
||||
return render(request, "html/baiban.html", param)
|
||||
|
||||
def to_pinglun(request):
|
||||
test_date = request.GET.get('id')
|
||||
comment_list = Comment.objects.filter(pinglun_id=test_date) # 从数据库找出该文章的评论数据对象
|
||||
param = {"path": test_date,
|
||||
"comment_list": comment_list}
|
||||
print(test_date)
|
||||
return render(request, "html/commont.html", param)
|
||||
|
||||
def to_share(request):
|
||||
"""
|
||||
分享页面
|
||||
|
||||
Reference in New Issue
Block a user