title: How to use JQuery and Django (ajax + HttpResponse)?
body: <p>Suppose I have an AJAX function:</p>
  
  <pre><code>function callpage{
  $.ajax({
      method:"get",
      url:"/abc/",
      data:"x="+3
      beforeSend:function() {},
      success:function(html){
         IF HTTPRESPONSE = "1" , ALERT SUCCESS!
      }
      });
      return false;
  }
  }
  </code></pre>
  
  <p>When my "View" executes in Django, I want to return <code>HttpResponse('1')</code> or <code>'0'</code>.</p>
  
  <p>How can I know if it was successful, and then make that alert?</p>