示例#1
0
def ajax_validate_language(request):
    response = True
    for element in request.GET.keys():
        text = request.GET.get(element)
        language = element.split('_')[1]
        if text != "":            
            response = response and correct_language(text,language)
    return render_to_response("ajax/ajax_response.html",{"response": response,},context_instance=RequestContext(request))     
示例#2
0
def ajax_correct_language(request):
    language = request.GET.get("language")
    text = request.GET.get("text")
    response = correct_language(text,language)
    return render_to_response("ajax/ajax_response.html",{"response": response,},context_instance=RequestContext(request))