from django.shortcuts import render

from projects.models import Project
# Create your views here.


def project_index(request):
    projects = Project.objects.all
    # print(projects)
    context = {
        'projects': projects,
    }

    return render(request, 'project_index.html', context)

def project_detail(request, project_id):
    print(project_id)
    project = Project.objects.get(id=project_id)
    print(project)
    context = {
        'project': project 
    }

    return render(request, 'project_detail.html', context)

