from django.shortcuts import render, get_object_or_404
from .models import Job
# Create your views here.
def home(request):
	jobs = Job.objects # Code takes all the jobs from the database and stores in jobs 
	return render(request, 'jobs/home.html',{'jobs':jobs})# the dict argument is needed to show jobs in html

def detail(request, job_id):
	print (job_id)
	job_detail = get_object_or_404(Job, pk=job_id)
	return render(request, 'jobs/detail.html', {'job':job_detail})
