title: How Will the Inclusion of Two Forms Affect my CSRF Token Use?
body: <p>I am attempting to create a page that includes two forms: one that is visible when the page loads (a signin form), and a second that appears in a modal if the user clicks a button (a signup form).</p>
  
  <p>I am using Django, and, although I am still figuring out how I will handle these forms, my largest concern is how the CSRF token will play into all of this. For example, should I use <code>{% csrf_token %}</code> inside of only one of my <code>&lt;form&gt;&lt;/form&gt;</code> tags, or should I place it in both?</p>
  
  <p>Further, if I do use it in both forms, will this affect my POSTS to the server in any way? Currently, I am taking the data in a form (depending on which submit button is clicked) and POSTing this way:</p>
  
  <pre><code>var data={
      'username':$('#username').val(), 
      'password':$('#password').val(),
      'csrfmiddlewaretoken': '{{ csrf_token }}'
  }
  
  $.post("/", signin_data);
  </code></pre>