title: django, set csrf token on form in static pages
body: <p>I'm a little confused. 
  The csrf token is set in the django templates </p>
  
  <p>With the tag:</p>
  
  <pre><code>{{csrf_token}}
  </code></pre>
  
  <p>However, my app is a Cordova app, which means that there's nothing loading from the server.
  The pages are fetched from the device's memory.</p>
  
  <p>How do I get the csrf_token in that case?</p>
  
  <p>I thought of making a view, which I will call with ajax, that will simply return the csrf_token string to the caller.</p>
  
  <p>Is that how you do it? Will that break the csrf_token security?
  Maybe there are better solutions?</p>
  
  <p>If that solution is the correct one, please tell how do you get the csrf token from the request.</p>
  
  <p>So just to reiterate the problem in a little different way: I need to submit a form from a static page.However, when I do so, I get csrf errors.</p>
  
  <p>How do I submit the form without getting csrf errors?</p>
  
  <p>Thanks in advance.</p>