title: "No 'Access-Control-Allow-Origin' header is present on the requested resource" in django
body: <p>I am newbie to django and using it as  back end for an application that creates users. In front end the code for posting the user name is :</p>
  
  <pre><code>var xobj = new XMLHttpRequest();
                xobj.overrideMimeType("application/json");
                xobj.open('POST', "http://www.local:8000/create_user/", true);
                  xobj.setRequestHeader("Access-Control-Allow-Origin", "*");
                xobj.onreadystatechange = function () {
                    if (xobj.readyState == 4 &amp;&amp; xobj.status == "200") {
                        console.log(xobj.responseText);
                    }
              }
                xobj.send(json);    
  </code></pre>
  
  <p>On back end the function associated with url handles json but i am getting the error
  "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://www.local:54521">http://www.local:54521</a>' is therefore not allowed access".
  What is the solution for this problem?
  Also I have followed the steps from "<a href="https://gist.github.com/strogonoff/1369619">https://gist.github.com/strogonoff/1369619</a>", but problem persists.</p>