示例#1
0
def live_search(request):
    return live_search_results(request,
                               FilmIdea,
                               result_item_formatting=lambda post: {
                                   'value': u'<div>%s</div>' % (post.summary),
                                   'result': post.summary,
                               })
示例#2
0
def live_search(request):
    return live_search_results(
        request,
        Box,
        'autocomplete_index',
        limit=3,
        redirect=True,
        query_converter=filter_published,
        result_item_formatting=lambda box: {
            'value':
            u'<div>%s / <i>%s</i><img src="%s" class="float-right item-img" /></div>'
            % (box.title, box.instructor.name, box.language.image.url),
            'result':
            box.title,
        })
示例#3
0
def live_search(request):
    return live_search_results(request, FilmIdea,
     result_item_formatting=lambda post:
        {'value': u'<div>%s</div>' % (post.summary),
        'result': post.summary, })
示例#4
0
def live_search(request):
    return live_search_results(
        request,
        FilmIdea,
        result_item_formatting=lambda post: {"value": u"<div>%s</div>" % (post.summary), "result": post.summary},
    )
示例#5
0
def live_search_test(request):
    return live_search_results(request, X, 'index', chain_sort=(('idx =', 1),
                                                                ('idx =', 2)))