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, })
def indexing(request): if request.method == 'POST': key = request.values.get('key') InvertedNameIndex.indexing(key) return Response(status=200)