from django.shortcuts import render
from django.http import HttpResponse# Create your views here.
from django.utils.html import mark_safe
from .models import Question
from django.shortcuts import get_object_or_404


def index(request):
    return render(request, 'polls/index.html', {
        'questions': Question.objects.all(),
    })

def detail(request, pk):
    obj = get_object_or_404(Question, pk=pk)
    return render(request, 'polls/detail.html', {
        'question': obj,
    })

04b22728b815e89119fb43457505202436894699
<mask token>

<mask token>


def detail(request, pk):
    obj = get_object_or_404(Question, pk=pk)
    return render(request, 'polls/detail.html', {'question': obj})

<mask token>


def index(request):
    return render(request, 'polls/index.html', {'questions': Question.
        objects.all()})


def detail(request, pk):
    obj = get_object_or_404(Question, pk=pk)
    return render(request, 'polls/detail.html', {'question': obj})

from django.shortcuts import render
from django.http import HttpResponse
from django.utils.html import mark_safe
from .models import Question
from django.shortcuts import get_object_or_404


def index(request):
    return render(request, 'polls/index.html', {'questions': Question.
        objects.all()})


def detail(request, pk):
    obj = get_object_or_404(Question, pk=pk)
    return render(request, 'polls/detail.html', {'question': obj})

from django.shortcuts import render
from django.http import HttpResponse# Create your views here.
from django.utils.html import mark_safe
from .models import Question
from django.shortcuts import get_object_or_404


def index(request):
    return render(request, 'polls/index.html', {
        'questions': Question.objects.all(),
    })

def detail(request, pk):
    obj = get_object_or_404(Question, pk=pk)
    return render(request, 'polls/detail.html', {
        'question': obj,
    })
