Example #1
0
def search(request):
    users = []
    word = request.values.get('word', None)
    if word:
        users = InvertedNameIndex.search(word)
    return render_to_response('index/search.html', {
        'users': users,
    })
Example #2
0
def indexing(request):
    if request.method == 'POST':
        key = request.values.get('key')
        InvertedNameIndex.indexing(key)
    return Response(status=200)