neighbourhood/views.py
def search_results(request):
    """Function for searching for business profile"""

    if 'search_business' in request.GET and request.GET["search_business"]:
        search_term = request.GET.get("search_business")
        searched_business = Business.search_by_name(search_term)
        message = f"{search_term}"
        title = search_term
        return render(request, 'search.html',{"message": message, "Enter Valid Business Input": searched_business, 'title': title})
    else:
        message = "Enter a valid business input"
        return render(request, 'search.html',{"message": message})
Function for searching for business profile
Function for searching for business profile
Function for searching for business profile
def search_results(request):
    if 'search_business' in request.GET and request.GET["search_business"]:
        search_term = request.GET.get("search_business")
        searched_business = Business.search_by_name(search_term)
        message = f"{search_term}"
        title = search_term
        return render(request, 'search.html',{"message": message, "Enter Valid Business Input": searched_business, 'title': title})
    else:
        message = "Enter a valid business input"
        return render(request, 'search.html',{"message": message})
def search_results ( request ) : if 'search_business' in request . GET and request . GET [ "search_business" ] : search_term = request . GET . get ( "search_business" ) searched_business = Business . search_by_name ( search_term ) message = f"{search_term}" title = search_term return render ( request , 'search.html' , { "message" : message , "Enter Valid Business Input" : searched_business , 'title' : title } ) else : message = "Enter a valid business input" return render ( request , 'search.html' , { "message" : message } )
Function for searching for business profile
Function for searching for business profile
"""Function for searching for business profile"""
request