如何在同一个HTML(即home_2.HTML)上显示所有这些视图,以及如何编写URL
def Home(request):
posts = Yogmodel.objects.filter
return render(request, 'frontend/home_2.html', {'posts': posts })
def Viewfulltest(request):
tests = Testimonial.objects.all()
context = {'tests':tests}
return render(request, 'frontend/testfullview.html', context)
def ViewAward2(request,id):
#award = request.GET.get('award')
awardphotos = AwardPhoto.objects.filter(award__id=id)
awards = AwardTitle.objects.all()
context = {'id':id,'awards': awards, 'awardphotos': awardphotos}
return render(request, 'frontend/viewaward2.html', context)
目前没有回答
相关问题 更多 >
编程相关推荐