Ejemplo n.º 1
0
def debug(request):
    logging.info("debug open")
    logging.info("hello open")
    t = get_template('debug.html')
    context = Context({'top_words':models.get_hot_query(4)})
    html = t.render(context)
    return HttpResponse(html)
Ejemplo n.º 2
0
def debug(request):
    logging.info("debug open")
    logging.info("hello open")
    t = get_template('debug.html')
    context = Context({'top_words': models.get_hot_query(4)})
    html = t.render(context)
    return HttpResponse(html)
Ejemplo n.º 3
0
def baike(request):
    word = request.GET.get('word',"")
    if word:
        models.insert_query_history(word)

    t = get_template('baike.html')
    context = Context({'top_words':models.get_hot_query(4)})
    html = t.render(context)
    return HttpResponse(html)
Ejemplo n.º 4
0
def baike(request):
    word = request.GET.get('word', "")
    #if word:
    #    models.insert_query_history(word)

    t = get_template('baike.html')
    context = Context({'top_words': models.get_hot_query(4)})
    html = t.render(context)
    return HttpResponse(html)
Ejemplo n.º 5
0
def get_top_word(request):
    result = models.get_hot_query(1000)
    list = []
    for index,word in enumerate(result):
        list.append({"id":index,"name":word})
    return HttpResponse(json.dumps(list))
Ejemplo n.º 6
0
def all_for_contrast(request) :
    t = get_template('all_for_contrast_index.html')
    context = Context({'top_words':models.get_hot_query(4)})
    html = t.render(context)
    return HttpResponse(html)
Ejemplo n.º 7
0
def get_top_word(request):
    result = models.get_hot_query(1000)
    list = []
    for index, word in enumerate(result):
        list.append({"id": index, "name": word})
    return HttpResponse(json.dumps(list))
Ejemplo n.º 8
0
def all_for_contrast(request):
    t = get_template('all_for_contrast_index.html')
    context = Context({'top_words': models.get_hot_query(4)})
    html = t.render(context)
    return HttpResponse(html)