Example #1
0
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)
Example #2
0
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)