title: django tastypie and cross domain json
body: <p>Got a django dev server running on localhost:8000 and a nodejs server on localhost:3000.  I want to import json into the nodejs server but I'm getting this error:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load
    <a href="http://127.0.0.1:8000/api/presentation/?format=json">http://127.0.0.1:8000/api/presentation/?format=json</a>. Origin
    <a href="http://localhost:3000">http://localhost:3000</a> is not allowed by Access-Control-Allow-Origin</p>
  </blockquote>
  
  <p>This is my first foray into cross-domain fun so I'm WAY out of my depth.</p>
  
  <p>I've added this to my routes in node (expressjs).</p>
  
  <pre><code>app.all('/', function(req, res){
    res.header("Access-Control-Allow-Origin", "*");
    res.header("Access-Control-Allow-Headers", "X-Requested-With");
    res.render('index', {
      title: '...'
    });
  });
  </code></pre>
  
  <p>What am I missing / doing wrong?</p>