title: How do I include Django 1.2's CSRF token in a Javascript-generated HTML form?
body: <p>I recently upgraded to Django 1.2.3 and my upload forms are now broken. Whenever I attempt to upload, I receive a "CSRF verification failed. Request aborted." error message.</p>
  
  <p>After reading <a href="http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it" rel="noreferrer">Django's documentation</a> on this subject, it states that I need to add the {% csrf_token %} template tag within the HTML <code>&lt;form&gt;</code> in my template. Unfortunately, my <code>&lt;form&gt;</code> is generated via JavaScript (specifically, ExtJs's "html" property on a Panel).</p>
  
  <p>Long story short, how do I add the required CSRF token tag to my <code>&lt;form&gt;</code> when my <code>&lt;form&gt;</code> is not included in a Django template?</p>