The following seems to pass a string instead of a boolean value. How would I pass a boolean?
$.post('/ajax/warning_message/', {'active': false}, function() {
return
});
def warning_message(request):
active = request.POST.get('active')
print active
return HttpResponse()
In your Python code do this:
Or even simpler:
Be aware that the
get()function will always return a string, so you need to convert it according to the actual type that you need.