I want to send a value to the server.I send it using:
$.post("http://127.0.0.1:8000/search/",{'long':"30"});
and my views.py is:
def search(request):
lon = request.POST.get('long','')
place = Places.objects.filter(longtitude__icontains=lon)
if place is not None:
return render_to_response('sr.html', {'place': place, 'query': lon})
else:
return HttpResponse("NOTHING FOUND")
But i can not get my database searched for places with longitude containing 30!!!!