Django, CSRF token makes an error! Where do I look at?What is a CSRF token ? What is its importance and how does it work?http 403 error with django and ajaxDjango Rest API urlsplit errorDjango 1.6 CSRF 403 errors500 Errors in Dreamhost Running Django under PassengerDjango CSRF IssuesNo CSRF token after Django 1.8 form errorCSRF not working in django with safari private browsingDifferent value of csrf token in response header and browser cookies. csrf verification failing in django 1.9Django Rest Framework: serializer response error

Examples where "thin + thin = nice and thick"

What is the extent of the commands a Cambion can issue through Fiendish Charm?

Supervisor wants me to support a diploma-thesis SW tool after I graduated

Is mountain bike good for long distances?

What exactly is Apple Cider

How to best explain that you are taking pictures in a space for practice reasons?

Short story: Interstellar inspector senses "off" nature of planet hiding aggressive culture

Owner keeps cutting corners and poaching workers for his other company

How many attacks exactly do I get combining Dual Wielder feat with Two-Weapon Fighting style?

I multiply the source, you (probably) multiply the output!

Do Sobolev spaces contain nowhere differentiable functions?

Fantasy Military Arms and Armor: the Dwarven Grand Armory

Let A,B,C be sets. If A△B=A△C, does this imply that B=C?

Relationship between speed and cadence?

When does order matter in probability?

Dynamic Picklist Value Retrieval

Why are there no wireless switches?

How to interpret or parse this confusing 'NOT' and 'AND' legal clause

Did the US Climate Reference Network Show No New Warming Since 2005 in the US?

Why do opposition parties not want an election?

Filling attribute tables with values from the same attribute table

Do disc brake rims ever need to be replaced?

Why did Tony's Arc Reactor do this?

After a few interviews, What should I do after told to wait?



Django, CSRF token makes an error! Where do I look at?


What is a CSRF token ? What is its importance and how does it work?http 403 error with django and ajaxDjango Rest API urlsplit errorDjango 1.6 CSRF 403 errors500 Errors in Dreamhost Running Django under PassengerDjango CSRF IssuesNo CSRF token after Django 1.8 form errorCSRF not working in django with safari private browsingDifferent value of csrf token in response header and browser cookies. csrf verification failing in django 1.9Django Rest Framework: serializer response error






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















While I'm looking at log file, I got many error logs related to CSRF



I got warning log below



Forbidden (CSRF token missing or incorrect.): /my/site/uri


and right after that error log below



Internal Server Error: /my/site/uri
Traceback (most recent call last):
File "/data/kukkart_env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 140, in get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 216, in process_view
return self._reject(request, REASON_BAD_TOKEN)
File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 106, in _reject
return _get_failure_view()(request, reason=reason)
TypeError: server_error() got an unexpected keyword argument 'reason'


And there is a form for a cart to submit.
There is a CSRF_TOKEN in a form



% block cart %
<form class="form-horizontal" method="post" action="/my/site/uri/">
% csrf_token %
<div class="modal" id="cartShowAllModal">
<div class="modal_wrap">
<div class="modal_content">
<h5 class="title">Cart</h5>
<div class="content-box">
<div class="modal_cart_wrap">
<div class="inner">
<ul class="cart_list">
cart_form.product_formset.management_form
% if cart_form.total_count != 0 and cart_form.total_count %
% for product_form in cart_form.product_formset %
</ul>
<div id="cart_message_empty" class="cart_list empty" style="display: none;">
% else %
<div id="cart_message_empty" class="cart_list empty" style="display: block;">
% endif %
<p class="txt"><span class="blind">Empty Cart</span></p>
</div>
</div>
</div>
</div>

<div class="cart_func">
% if cart_form.total_count != 0 %
<button id="cart_close" type="button" class="btn cancel"><span>Continue Shopping</span></button>
<button id="cart_message_checkout" type="submit" class="btn checkout"><span>Checkout</span></button>
% endif %
</div>
<script>
$('#cart_close').on('click', function ()
closeModal();
)
</script>

<a href="#" class="close"><span class="blind">Close Popup</span></a>
</div>
</div>
</div>
</form>
% endblock %


the views.py is this



I don't know what the issue is.



class CartSubmitView(CheckoutClearSessionMixin, View):
def post(self, request, *args, **kwargs):
if 'cart_product_pks' not in self.request.session:
return HttpResponseRedirect('/')

if len(self.request.session['cart_product_pks']) == 0:
return HttpResponseRedirect('/')

if self.request.user.is_authenticated() and self.request.user.is_non_registered:
from account import views as account_views
account_views.logout(request)
return HttpResponseRedirect('/account/login/?next=/order/checkout/')

for cart_product_pk in self.request.session['cart_product_pks']:
for key, value in self.request.POST.items():
try:
if int(value) == int(cart_product_pk):
quantity = int(self.request.POST[key.replace('id', 'quantity')])
order_product = models.OrderProduct.objects.get(pk=cart_product_pk)
order_product.quantity = quantity
order_product.save()
except:
continue

self.request.session['cart_checkout'] = True
self.request.session['order_product_pks'] = self.request.session['cart_product_pks']

return HttpResponseRedirect('/order/checkout/')


There is not that much source code related csrf token here



What makes this error?










share|improve this question
































    2















    While I'm looking at log file, I got many error logs related to CSRF



    I got warning log below



    Forbidden (CSRF token missing or incorrect.): /my/site/uri


    and right after that error log below



    Internal Server Error: /my/site/uri
    Traceback (most recent call last):
    File "/data/kukkart_env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 140, in get_response
    response = middleware_method(request, callback, callback_args, callback_kwargs)
    File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 216, in process_view
    return self._reject(request, REASON_BAD_TOKEN)
    File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 106, in _reject
    return _get_failure_view()(request, reason=reason)
    TypeError: server_error() got an unexpected keyword argument 'reason'


    And there is a form for a cart to submit.
    There is a CSRF_TOKEN in a form



    % block cart %
    <form class="form-horizontal" method="post" action="/my/site/uri/">
    % csrf_token %
    <div class="modal" id="cartShowAllModal">
    <div class="modal_wrap">
    <div class="modal_content">
    <h5 class="title">Cart</h5>
    <div class="content-box">
    <div class="modal_cart_wrap">
    <div class="inner">
    <ul class="cart_list">
    cart_form.product_formset.management_form
    % if cart_form.total_count != 0 and cart_form.total_count %
    % for product_form in cart_form.product_formset %
    </ul>
    <div id="cart_message_empty" class="cart_list empty" style="display: none;">
    % else %
    <div id="cart_message_empty" class="cart_list empty" style="display: block;">
    % endif %
    <p class="txt"><span class="blind">Empty Cart</span></p>
    </div>
    </div>
    </div>
    </div>

    <div class="cart_func">
    % if cart_form.total_count != 0 %
    <button id="cart_close" type="button" class="btn cancel"><span>Continue Shopping</span></button>
    <button id="cart_message_checkout" type="submit" class="btn checkout"><span>Checkout</span></button>
    % endif %
    </div>
    <script>
    $('#cart_close').on('click', function ()
    closeModal();
    )
    </script>

    <a href="#" class="close"><span class="blind">Close Popup</span></a>
    </div>
    </div>
    </div>
    </form>
    % endblock %


    the views.py is this



    I don't know what the issue is.



    class CartSubmitView(CheckoutClearSessionMixin, View):
    def post(self, request, *args, **kwargs):
    if 'cart_product_pks' not in self.request.session:
    return HttpResponseRedirect('/')

    if len(self.request.session['cart_product_pks']) == 0:
    return HttpResponseRedirect('/')

    if self.request.user.is_authenticated() and self.request.user.is_non_registered:
    from account import views as account_views
    account_views.logout(request)
    return HttpResponseRedirect('/account/login/?next=/order/checkout/')

    for cart_product_pk in self.request.session['cart_product_pks']:
    for key, value in self.request.POST.items():
    try:
    if int(value) == int(cart_product_pk):
    quantity = int(self.request.POST[key.replace('id', 'quantity')])
    order_product = models.OrderProduct.objects.get(pk=cart_product_pk)
    order_product.quantity = quantity
    order_product.save()
    except:
    continue

    self.request.session['cart_checkout'] = True
    self.request.session['order_product_pks'] = self.request.session['cart_product_pks']

    return HttpResponseRedirect('/order/checkout/')


    There is not that much source code related csrf token here



    What makes this error?










    share|improve this question




























      2












      2








      2


      1






      While I'm looking at log file, I got many error logs related to CSRF



      I got warning log below



      Forbidden (CSRF token missing or incorrect.): /my/site/uri


      and right after that error log below



      Internal Server Error: /my/site/uri
      Traceback (most recent call last):
      File "/data/kukkart_env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 140, in get_response
      response = middleware_method(request, callback, callback_args, callback_kwargs)
      File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 216, in process_view
      return self._reject(request, REASON_BAD_TOKEN)
      File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 106, in _reject
      return _get_failure_view()(request, reason=reason)
      TypeError: server_error() got an unexpected keyword argument 'reason'


      And there is a form for a cart to submit.
      There is a CSRF_TOKEN in a form



      % block cart %
      <form class="form-horizontal" method="post" action="/my/site/uri/">
      % csrf_token %
      <div class="modal" id="cartShowAllModal">
      <div class="modal_wrap">
      <div class="modal_content">
      <h5 class="title">Cart</h5>
      <div class="content-box">
      <div class="modal_cart_wrap">
      <div class="inner">
      <ul class="cart_list">
      cart_form.product_formset.management_form
      % if cart_form.total_count != 0 and cart_form.total_count %
      % for product_form in cart_form.product_formset %
      </ul>
      <div id="cart_message_empty" class="cart_list empty" style="display: none;">
      % else %
      <div id="cart_message_empty" class="cart_list empty" style="display: block;">
      % endif %
      <p class="txt"><span class="blind">Empty Cart</span></p>
      </div>
      </div>
      </div>
      </div>

      <div class="cart_func">
      % if cart_form.total_count != 0 %
      <button id="cart_close" type="button" class="btn cancel"><span>Continue Shopping</span></button>
      <button id="cart_message_checkout" type="submit" class="btn checkout"><span>Checkout</span></button>
      % endif %
      </div>
      <script>
      $('#cart_close').on('click', function ()
      closeModal();
      )
      </script>

      <a href="#" class="close"><span class="blind">Close Popup</span></a>
      </div>
      </div>
      </div>
      </form>
      % endblock %


      the views.py is this



      I don't know what the issue is.



      class CartSubmitView(CheckoutClearSessionMixin, View):
      def post(self, request, *args, **kwargs):
      if 'cart_product_pks' not in self.request.session:
      return HttpResponseRedirect('/')

      if len(self.request.session['cart_product_pks']) == 0:
      return HttpResponseRedirect('/')

      if self.request.user.is_authenticated() and self.request.user.is_non_registered:
      from account import views as account_views
      account_views.logout(request)
      return HttpResponseRedirect('/account/login/?next=/order/checkout/')

      for cart_product_pk in self.request.session['cart_product_pks']:
      for key, value in self.request.POST.items():
      try:
      if int(value) == int(cart_product_pk):
      quantity = int(self.request.POST[key.replace('id', 'quantity')])
      order_product = models.OrderProduct.objects.get(pk=cart_product_pk)
      order_product.quantity = quantity
      order_product.save()
      except:
      continue

      self.request.session['cart_checkout'] = True
      self.request.session['order_product_pks'] = self.request.session['cart_product_pks']

      return HttpResponseRedirect('/order/checkout/')


      There is not that much source code related csrf token here



      What makes this error?










      share|improve this question
















      While I'm looking at log file, I got many error logs related to CSRF



      I got warning log below



      Forbidden (CSRF token missing or incorrect.): /my/site/uri


      and right after that error log below



      Internal Server Error: /my/site/uri
      Traceback (most recent call last):
      File "/data/kukkart_env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 140, in get_response
      response = middleware_method(request, callback, callback_args, callback_kwargs)
      File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 216, in process_view
      return self._reject(request, REASON_BAD_TOKEN)
      File "/data/kukkart_env/local/lib/python2.7/site-packages/django/middleware/csrf.py", line 106, in _reject
      return _get_failure_view()(request, reason=reason)
      TypeError: server_error() got an unexpected keyword argument 'reason'


      And there is a form for a cart to submit.
      There is a CSRF_TOKEN in a form



      % block cart %
      <form class="form-horizontal" method="post" action="/my/site/uri/">
      % csrf_token %
      <div class="modal" id="cartShowAllModal">
      <div class="modal_wrap">
      <div class="modal_content">
      <h5 class="title">Cart</h5>
      <div class="content-box">
      <div class="modal_cart_wrap">
      <div class="inner">
      <ul class="cart_list">
      cart_form.product_formset.management_form
      % if cart_form.total_count != 0 and cart_form.total_count %
      % for product_form in cart_form.product_formset %
      </ul>
      <div id="cart_message_empty" class="cart_list empty" style="display: none;">
      % else %
      <div id="cart_message_empty" class="cart_list empty" style="display: block;">
      % endif %
      <p class="txt"><span class="blind">Empty Cart</span></p>
      </div>
      </div>
      </div>
      </div>

      <div class="cart_func">
      % if cart_form.total_count != 0 %
      <button id="cart_close" type="button" class="btn cancel"><span>Continue Shopping</span></button>
      <button id="cart_message_checkout" type="submit" class="btn checkout"><span>Checkout</span></button>
      % endif %
      </div>
      <script>
      $('#cart_close').on('click', function ()
      closeModal();
      )
      </script>

      <a href="#" class="close"><span class="blind">Close Popup</span></a>
      </div>
      </div>
      </div>
      </form>
      % endblock %


      the views.py is this



      I don't know what the issue is.



      class CartSubmitView(CheckoutClearSessionMixin, View):
      def post(self, request, *args, **kwargs):
      if 'cart_product_pks' not in self.request.session:
      return HttpResponseRedirect('/')

      if len(self.request.session['cart_product_pks']) == 0:
      return HttpResponseRedirect('/')

      if self.request.user.is_authenticated() and self.request.user.is_non_registered:
      from account import views as account_views
      account_views.logout(request)
      return HttpResponseRedirect('/account/login/?next=/order/checkout/')

      for cart_product_pk in self.request.session['cart_product_pks']:
      for key, value in self.request.POST.items():
      try:
      if int(value) == int(cart_product_pk):
      quantity = int(self.request.POST[key.replace('id', 'quantity')])
      order_product = models.OrderProduct.objects.get(pk=cart_product_pk)
      order_product.quantity = quantity
      order_product.save()
      except:
      continue

      self.request.session['cart_checkout'] = True
      self.request.session['order_product_pks'] = self.request.session['cart_product_pks']

      return HttpResponseRedirect('/order/checkout/')


      There is not that much source code related csrf token here



      What makes this error?







      django csrf django-csrf django-middleware






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 8:08







      Eric Lee

















      asked Mar 28 at 6:02









      Eric LeeEric Lee

      2566 silver badges21 bronze badges




      2566 silver badges21 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0
















          It means that the form you are submitting is missing the csrf_token which is used to prevent malicious attacks.



          To integrate a csrf_token in a form, you should add % csrf_token %. Example:



          <form>
          % csrf_token %
          <input type="text" />
          </form>


          To integrate into an AJAX request, you can use the csrf_token variable. Example:



          var data = 
          csrfmiddlewaretoken: "csrf_token",
          ...
          ;

          $.ajax(
          type: 'POST',
          url: 'url/to/ajax/',
          data: data,
          dataType: 'json',
          ...
          );





          share|improve this answer

























          • I already did! there is always csrf_token there in a form. But sometimes it happens

            – Eric Lee
            Mar 28 at 6:15












          • show me your HTML, perhaps you made an oversight

            – Hybrid
            Mar 28 at 6:17











          • what do you mean by I might made an oversight?

            – Eric Lee
            Mar 28 at 6:23











          • I mean perhaps you missed something by accident, or there is a small error

            – Hybrid
            Mar 28 at 6:24











          • I just added my html form. please check this out

            – Eric Lee
            Mar 28 at 6:30










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55391056%2fdjango-csrf-token-makes-an-error-where-do-i-look-at%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0
















          It means that the form you are submitting is missing the csrf_token which is used to prevent malicious attacks.



          To integrate a csrf_token in a form, you should add % csrf_token %. Example:



          <form>
          % csrf_token %
          <input type="text" />
          </form>


          To integrate into an AJAX request, you can use the csrf_token variable. Example:



          var data = 
          csrfmiddlewaretoken: "csrf_token",
          ...
          ;

          $.ajax(
          type: 'POST',
          url: 'url/to/ajax/',
          data: data,
          dataType: 'json',
          ...
          );





          share|improve this answer

























          • I already did! there is always csrf_token there in a form. But sometimes it happens

            – Eric Lee
            Mar 28 at 6:15












          • show me your HTML, perhaps you made an oversight

            – Hybrid
            Mar 28 at 6:17











          • what do you mean by I might made an oversight?

            – Eric Lee
            Mar 28 at 6:23











          • I mean perhaps you missed something by accident, or there is a small error

            – Hybrid
            Mar 28 at 6:24











          • I just added my html form. please check this out

            – Eric Lee
            Mar 28 at 6:30















          0
















          It means that the form you are submitting is missing the csrf_token which is used to prevent malicious attacks.



          To integrate a csrf_token in a form, you should add % csrf_token %. Example:



          <form>
          % csrf_token %
          <input type="text" />
          </form>


          To integrate into an AJAX request, you can use the csrf_token variable. Example:



          var data = 
          csrfmiddlewaretoken: "csrf_token",
          ...
          ;

          $.ajax(
          type: 'POST',
          url: 'url/to/ajax/',
          data: data,
          dataType: 'json',
          ...
          );





          share|improve this answer

























          • I already did! there is always csrf_token there in a form. But sometimes it happens

            – Eric Lee
            Mar 28 at 6:15












          • show me your HTML, perhaps you made an oversight

            – Hybrid
            Mar 28 at 6:17











          • what do you mean by I might made an oversight?

            – Eric Lee
            Mar 28 at 6:23











          • I mean perhaps you missed something by accident, or there is a small error

            – Hybrid
            Mar 28 at 6:24











          • I just added my html form. please check this out

            – Eric Lee
            Mar 28 at 6:30













          0














          0










          0









          It means that the form you are submitting is missing the csrf_token which is used to prevent malicious attacks.



          To integrate a csrf_token in a form, you should add % csrf_token %. Example:



          <form>
          % csrf_token %
          <input type="text" />
          </form>


          To integrate into an AJAX request, you can use the csrf_token variable. Example:



          var data = 
          csrfmiddlewaretoken: "csrf_token",
          ...
          ;

          $.ajax(
          type: 'POST',
          url: 'url/to/ajax/',
          data: data,
          dataType: 'json',
          ...
          );





          share|improve this answer













          It means that the form you are submitting is missing the csrf_token which is used to prevent malicious attacks.



          To integrate a csrf_token in a form, you should add % csrf_token %. Example:



          <form>
          % csrf_token %
          <input type="text" />
          </form>


          To integrate into an AJAX request, you can use the csrf_token variable. Example:



          var data = 
          csrfmiddlewaretoken: "csrf_token",
          ...
          ;

          $.ajax(
          type: 'POST',
          url: 'url/to/ajax/',
          data: data,
          dataType: 'json',
          ...
          );






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 6:10









          HybridHybrid

          3,9652 gold badges10 silver badges32 bronze badges




          3,9652 gold badges10 silver badges32 bronze badges















          • I already did! there is always csrf_token there in a form. But sometimes it happens

            – Eric Lee
            Mar 28 at 6:15












          • show me your HTML, perhaps you made an oversight

            – Hybrid
            Mar 28 at 6:17











          • what do you mean by I might made an oversight?

            – Eric Lee
            Mar 28 at 6:23











          • I mean perhaps you missed something by accident, or there is a small error

            – Hybrid
            Mar 28 at 6:24











          • I just added my html form. please check this out

            – Eric Lee
            Mar 28 at 6:30

















          • I already did! there is always csrf_token there in a form. But sometimes it happens

            – Eric Lee
            Mar 28 at 6:15












          • show me your HTML, perhaps you made an oversight

            – Hybrid
            Mar 28 at 6:17











          • what do you mean by I might made an oversight?

            – Eric Lee
            Mar 28 at 6:23











          • I mean perhaps you missed something by accident, or there is a small error

            – Hybrid
            Mar 28 at 6:24











          • I just added my html form. please check this out

            – Eric Lee
            Mar 28 at 6:30
















          I already did! there is always csrf_token there in a form. But sometimes it happens

          – Eric Lee
          Mar 28 at 6:15






          I already did! there is always csrf_token there in a form. But sometimes it happens

          – Eric Lee
          Mar 28 at 6:15














          show me your HTML, perhaps you made an oversight

          – Hybrid
          Mar 28 at 6:17





          show me your HTML, perhaps you made an oversight

          – Hybrid
          Mar 28 at 6:17













          what do you mean by I might made an oversight?

          – Eric Lee
          Mar 28 at 6:23





          what do you mean by I might made an oversight?

          – Eric Lee
          Mar 28 at 6:23













          I mean perhaps you missed something by accident, or there is a small error

          – Hybrid
          Mar 28 at 6:24





          I mean perhaps you missed something by accident, or there is a small error

          – Hybrid
          Mar 28 at 6:24













          I just added my html form. please check this out

          – Eric Lee
          Mar 28 at 6:30





          I just added my html form. please check this out

          – Eric Lee
          Mar 28 at 6:30








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55391056%2fdjango-csrf-token-makes-an-error-where-do-i-look-at%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript