Пример #1
0
def legal_search(query, result_type):
    results = {}

    # Only hit the API if there's an actual query
    if query:
        results = api_caller.load_legal_search_results(query, result_type, limit=3)

    return views.render_legal_search_results(results, query, result_type)
Пример #2
0
def legal_search(query, result_type):
    results = {}
    if result_type not in ['all', 'aos', 'regs', 'murs']:
        result_type = 'all'

    # Only hit the API if there's an actual query
    if query:
        results = api_caller.load_legal_search_results(query, result_type)

    return views.render_legal_search_results(results, query, result_type)
Пример #3
0
def legal_search(query, result_type):
    results = {}

    # Only hit the API if there's an actual query
    if query:
        results = api_caller.load_legal_search_results(query,
                                                       result_type,
                                                       limit=3)

    return views.render_legal_search_results(results, query, result_type)
Пример #4
0
def legal_search(query, result_type):
    if result_type != 'all':
        # search_type is used for google analytics
        return redirect(url_for(result_type, search=query, search_type=result_type))

    results = {}

    # Only hit the API if there's an actual query
    if query:
        results = api_caller.load_legal_search_results(query, result_type, limit=3)

    return views.render_legal_search_results(results, query, result_type)
Пример #5
0
def legal_search(query, result_type):
    if result_type != 'all':
        # search_type is used for google analytics
        return redirect(url_for(result_type, search=query, search_type=result_type))

    results = {}

    # Only hit the API if there's an actual query
    if query:
        results = api_caller.load_legal_search_results(query, result_type, limit=3)

    return views.render_legal_search_results(results, query, result_type)