# Create your views here.

from django.shortcuts import render
from projects.models import Project

#show all portfolio page.
def project_index(request):
    projects = Project.objects.all()
    context = {
        'projects': projects
    }
    return render(request, 'project_index.html', context)

# show detail portfolio
def project_detail(request, pk):
    project = Project.objects.get(pk=pk)
    context = {
        'project': project
    }
    return render(request, 'project_detail.html', context)
# Create your views here.

from django.shortcuts import render
from projects.models import Project

#show all portfolio page.
def project_index(request):
    projects = Project.objects.all()
    context = {
        'projects': projects
    }
    return render(request, 'project_index.html', context)

# show detail portfolio
def project_detail(request, pk):
    project = Project.objects.get(pk=pk)
    context = {
        'project': project
    }
    return render(request, 'project_detail.html', context)
# Create your views here. #show all portfolio page. # show detail portfolio