@login_required(login_url='/login')
def search_results(request):
    if (('search_project' in request.GET) and request.GET['search_project']):
        search_term = request.GET.get('search_project')
        searched_projects = Project.search_project_by_search_term(search_term)
        message = f'{search_term}'
        return render(request, 'main/search.html', {'message': message, 'projects': searched_projects})
    else:
        message = "You haven't searched for any project"
    return render(request, 'main/search.html', {'message': message})
@login_required(login_url='/login')
def search_results(request):
    if (('search_project' in request.GET) and request.GET['search_project']):
        search_term = request.GET.get('search_project')
        searched_projects = Project.search_project_by_search_term(search_term)
        message = f'{search_term}'
        return render(request, 'main/search.html', {'message': message, 'projects': searched_projects})
    else:
        message = "You haven't searched for any project"
    return render(request, 'main/search.html', {'message': message})