from pageapp.models import page
from django.shortcuts import render, get_object_or_404
from django.template import RequestContext


def getpage(request, page_id):
    pagedetail = get_object_or_404(page, pk=page_id)
    return render(request, 'pageapp/page.html', {'page': pagedetail})

def aboutpage(request):
    about = get_object_or_404(page, pk=1)
    return render(request, 'pageapp/page.html', {'page': about})

def contactpage(request):
    contact = get_object_or_404(page, pk=2)
    return render(request, 'pageapp/page.html', {'page': contact})

