def NewsView(request): news = News.objects.all() vote_info = vote(request) context = { 'news': news , 'vote_info': vote_info, } return render(request, 'newspage.html', context=context)
def pollsView(request): polls_list = Question.objects.all() vote_info = vote(request) context = { 'polls_list': polls_list , 'vote_info': vote_info , } return render(request, 'pollspage.html', context=context)