[Answer]-Request.is_ajax not executing render_to_response django

1👍

I will suggest you to return response in json format. that will solve your problem.
you can take help from below given code and can change your views.py

import json
if request.is_ajax:
    print "comes here"
    value1 = request.GET['name']
    print value1
    data = dbs.objects.filter(cname=value1)
    json = simplejson.dumps(data)
    return HttpResponse(json, mimetype='application/json')

Leave a comment