from django.shortcuts import render
from django.http import HttpResponse
from .models import Page


def page_list(request):
    context = {
        "pages": Page.objects.all()
    }
    return render(request, 'list.html', context)

def page_detail(request,page_id):
    context = {
        "page": Page.objects.get(id=page_id)
    }
    return render(request, 'detail.html', context)
