title: Access-Control-Allow-Origin in Django app
body: <p>I'm developing a Phonegap app for my Django based app, but when trying to make Ajax calls I get this error:</p>
  
  <pre><code>XMLHttpRequest cannot load http://domain.herokuapp.com/getcsrf/?tags=jquery%2Cjavascript&amp;tagmode=any&amp;format=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 
  </code></pre>
  
  <p>How can I make it so my Django app allows cross origin for some urls?</p>
  
  <p>Here's my Ajax code:</p>
  
  <pre><code>get: function() {
      $.getJSON("http://domain.herokuapp.com/getcsrf/",
      {
          tags: "jquery,javascript",
          tagmode: "any",
          format: "json"
      },
      function(data) {
          $.each(data.items, function(item){
              console.log(item);
              });
      });
  }
  </code></pre>