title: Django CSRF Cookie Not Set
body: <p>I have some problem for a while now, I'm experiencing CSRF Cookie not set. Please look at the codes below</p>
  <h2>Python</h2>
  <pre class="lang-py prettyprint-override"><code>def deposit(request, account_num):
      if request.method == 'POST':
          account = get_object_or_404(account_info, acct_number=account_num)
          form_ = AccountForm(request.POST or None, instance=account)
          form = BalanceForm(request.POST)
          info = str(account_info.objects.filter(acct_number=account_num))
          inf = info.split()
          
          if form.is_valid():
  
              # cd=form.cleaned_data
              now = datetime.datetime.now()
              cmodel = form.save()
              cmodel.acct_number = account_num
              
              # RepresentsInt(cmodel.acct_number)
              cmodel.bal_change = &quot;%0.2f&quot; % float(cmodel.bal_change)
              cmodel.total_balance = &quot;%0.2f&quot; % (float(inf[1]) + float(cmodel.bal_change))
              account.balance = &quot;%0.2f&quot; % float(cmodel.total_balance)
              cmodel.total_balance = &quot;%0.2f&quot; % float(cmodel.total_balance)
              
              # cmodel.bal_change=cmodel.bal_change
              cmodel.issued = now.strftime(&quot;%m/%d/%y %I:%M:%S %p&quot;)
              account.recent_change = cmodel.issued
              cmodel.save()
              account.save()
              
              return HttpResponseRedirect(&quot;/history/&quot; + account_num + &quot;/&quot;)
          
          else:
              return render_to_response('history.html',
                                        {'account_form': form},
                                        context_instance=RequestContext(request))
  
  </code></pre>
  <p>In the HTML here is the code</p>
  <h2>HTML</h2>
  <pre class="lang-html prettyprint-override"><code>&lt;form action=&quot;/deposit/{{ account_num }}/&quot; method=&quot;post&quot;&gt;
      &lt;table&gt;
          &lt;tr&gt;
              {{ account_form.bal_change }}
              &amp;nbsp;
              &lt;input type=&quot;submit&quot; value=&quot;Deposit&quot;/&gt;
          &lt;/tr&gt;
          {% csrf_token %}
      &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  <p>Im stuck, I already cleared the cookie, used other browser but still csrf cookie not set.</p>