tools/views.py
def search(request):
    """
    used for UI autocomplete searches. Only used on the endpoint details page. Filter out standalone type templates
    :param request:
    :return:
    """
    term = request.GET["term"]
    template_list = ConfigTemplate.objects.filter(name__contains=term)
    results = []
    for template in template_list:
        results.append(template.name)

    return HttpResponse(json.dumps(results), content_type="application/json")

    used for UI autocomplete searches. Only used on the endpoint details page. Filter out standalone type templates
    :param request:
    :return:
    
used for UI autocomplete searches. Only used on the endpoint details page. Filter out standalone type templates
used for UI autocomplete searches . Only used on the endpoint details page . Filter out standalone type templates
def search(request):
    term = request.GET["term"]
    template_list = ConfigTemplate.objects.filter(name__contains=term)
    results = []
    for template in template_list:
        results.append(template.name)
    return HttpResponse(json.dumps(results), content_type="application/json")
def search ( request ) : term = request . GET [ "term" ] template_list = ConfigTemplate . objects . filter ( name__contains = term ) results = [ ] for template in template_list : results . append ( template . name ) return HttpResponse ( json . dumps ( results ) , content_type = "application/json" )
used for UI autocomplete searches.
used for UI autocomplete searches .
"""
    used for UI autocomplete searches. Only used on the endpoint details page. Filter out standalone type templates
    :param request:
    :return:
    """
None
request
None