title: CSRF token missing or incorrect on one page
body: <p>Have a homepage there every page with a form works fine.<br>
  Added a form to my start page and in my local server it works fine.<br>
  But when I add it to the production server it does not work.<br>
  It say's that <strong>CSRF- token is missing or incorret</strong>.<br>
  But I have added the token, and it works all the other pages.  </p>
  
  <p>What is that I'm missing... ? </p>
  
  <p>View  </p>
  
  <pre><code>  @login_required
      def start(request) :
          libs = Library.objects.all();
          header = Header('Start');
          studies = None;
          source = None;
          if request.method == 'POST' :
              if 'Show_studie' in request.POST:
                  studies = Study.objects.all;
              if 'Show_source' in request.POST:
                  source = Source.objects.all;
          dctArgs = {
              'library_list': libs,
              'styles_dir': conf.styles_path,
              'header': header.html,
              'studies_list':studies,
              'source_list':source,
              'images_dir': conf.images_path,
              };
          return render_to_response('start.html', dctArgs, RequestContext(request));
  
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;TITLE&gt;&lt;/TITLE&gt;
  &lt;link rel="stylesheet" type="text/css" href="{{styles_dir}}/common.css" /&gt;
  &lt;link rel="stylesheet" type="text/css" href="{{styles_dir}}/header.css" /&gt;
  &lt;link rel="stylesheet" type="text/css" href="{{styles_dir}}/Headerstyles.css" /&gt;
  &lt;/HEAD&gt;
  &lt;BODY&gt;
  {{header|safe}}
  &lt;h1&gt;&lt;/h1&gt;
  &lt;table id="doc_tbl" class="data" cellspacing=0&gt;
  &lt;tr&gt;
    &lt;th&gt;Name&lt;/th&gt;
    &lt;th&gt;Documents&lt;/th&gt;
    &lt;th&gt;Export&lt;/th&gt;
  &lt;/tr&gt;
  {% for library in library_list %}
      &lt;tr&gt;
      &lt;td&gt;&lt;a href="/library_overview/{{library.id}}/"&gt;{{library.name}}&lt;/a&gt;&lt;/td&gt;
      &lt;td&gt;{{library.source_set.all|length}}&lt;/td&gt;
      &lt;td&gt;&lt;a href="/library_export/{{library.id}}/format/TS/"&gt;Andra till Jesper Export&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
  {% endfor %}
  &lt;/table&gt;
  &lt;h3&gt;Messages&lt;/h3&gt;
  {{messages}}
  &lt;/br&gt;
  &lt;form id="form1" name="form1" method="post" action="/start/" enctype="multipart/form-data"&gt;
  {% csrf_token %}
  &lt;fieldset style="width:300px; margin-left:5px;"&gt;
  &lt;legend&gt; Show all &lt;/legend&gt;
  &lt;input type="checkbox" name="Show_studie" value="Show Studie"&gt; Studie
  &lt;input type="checkbox" name="Show_source" value="Show Source"&gt; Source
  &lt;/br&gt;
  &lt;/br&gt;
  &lt;input type="submit" value="Show All"&gt;
  &lt;/fieldset&gt;
  {% if studies_list %}
  &lt;h3&gt; Studies &lt;/h3&gt;
  &lt;table class="table1"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;th scope="col1" &gt;Name&lt;/th&gt;
    &lt;th scope="col1" &gt;Added by&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  {% for study in studies_list %}
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;
    &lt;a href="/define_study/{{study.id}}/edit/"&gt;&lt;img class="icon" src="{{images_dir}}/edit-icon.png"/&gt;&lt;/a&gt;
    &amp;nbsp;
    &lt;img onclick="javascript:return confirmDelete_name('Are you sure? The study and any associated information will be deleted.', {{study.id}}, 'delete_study');" class="icon" src="{{images_dir}}/delete-icon.png"/&gt;
  &lt;/td&gt;
  &lt;td&gt;&lt;a href="/define_study/{{study.id}}/"&gt;{{study.name}}&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;{{study.metadata_added_by_user.first_name}}&amp;nbsp;{{study.metadata_added_by_user.last_name}}&lt;/td&gt;
  &lt;/tr&gt;
  {% endfor %}
  &lt;/table&gt;
  {% endif %}
  {% if source_list %}
  &lt;h3&gt; Source &lt;/h3&gt;
  &lt;table class="table1"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;th scope="col1" &gt;Name&lt;/th&gt;
    &lt;th scope="col1" &gt;Added by&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  {% for source in source_list %}
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;
    &lt;a href="/define_study/{{study.id}}/edit/"&gt;&lt;img class="icon" src="{{images_dir}}/edit-icon.png"/&gt;&lt;/a&gt;
    &amp;nbsp;
    &lt;img onclick="javascript:return confirmDelete_name('Are you sure? The study and any associated information will be deleted.', {{study.id}}, 'delete_study');" class="icon" src="{{images_dir}}/delete-icon.png"/&gt;
  &lt;/td&gt;
  &lt;td&gt;&lt;a href="/define_study/{{study.id}}/"&gt;{{source.name}}&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;{{source.metadata_added_by_user.first_name}}&amp;nbsp;{{source.metadata_added_by_user.last_name}}&lt;/td&gt;
  &lt;/tr&gt;
  {% endfor %}
  {% endif %}
  &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/form&gt; 
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p>Forbidden (403)
  CSRF verification failed. Request aborted.
  Help
  Reason given for failure:
      CSRF token missing or incorrect.</p>
  
  <p>In general, this can occur when there is a genuine Cross Site Request Forgery, or when Django's<br>
  CSRF mechanism has not been used correctly. For POST forms, you need to ensure:<br>
  •   The view function uses RequestContext for the template, instead of Context.<br>
  •   In the template, there is a {% csrf_token %} template tag inside each POST form that   targets an internal URL.<br>
  •   If you are not using CsrfViewMiddleware, then you must use csrf_protect on any views<br>
     that use the csrf_token template tag, as well as those that accept the POST data.
  You're seeing the help section of this page because you have DEBUG = True in your Django   settings file. Change that to False, and only the initial error message will be displayed.<br>
  You can customize this page using the CSRF_FAILURE_VIEW setting.  </p>
  
  <p>Settings</p>
  
  <pre><code>MIDDLEWARE_CLASSES = (
      'django.middleware.common.CommonMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
  )
  </code></pre>
  
  <p>On the page that working I get this message:  </p>
  
  <pre><code>&lt;django.contrib.messages.storage.fallback.FallbackStorage object at 0x03B7A270&gt; 
  </code></pre>