def home_page(request):
    projects = Project.objects.all()[1:]
    highlightProject = Project.objects.all().order_by('id').last()
    try:
        rating = Rating.objects.filter(project_id=highlightProject.id)
    except Rating.DoesNotExist:
        rating = None
    ctx = {'projects': projects, 'highlightProject': highlightProject, 'rating': rating}
    return render(request, 'main/home_page.html', ctx)
def home_page(request):
    projects = Project.objects.all()[1:]
    highlightProject = Project.objects.all().order_by('id').last()
    try:
        rating = Rating.objects.filter(project_id=highlightProject.id)
    except Rating.DoesNotExist:
        rating = None
    ctx = {'projects': projects, 'highlightProject': highlightProject, 'rating': rating}
    return render(request, 'main/home_page.html', ctx)