--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/iMXtpFVaRp8J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
CSRF verification failed. Request aborted.
Reason given for failure:
CSRF cookie not set.
In general, this can occur when there is a genuine Cross Site Request Forgery, or when Django's CSRF mechanism has not been used correctly. For POST forms, you need to ensure:
RequestContext
for the template, instead of Context
.{% csrf_token %}
template tag inside each POST form that targets an internal URL.CsrfViewMiddleware
, then you must use csrf_protect
on any views 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.
You can customize this page using the CSRF_FAILURE_VIEW setting.
---------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/K1p4e5lY1B4J.
----------------------------------------------------------------
<snip>
Forbidden (403)---------------------------------CSRF verification failed. Request aborted.
Help
Reason given for failure:
CSRF cookie not set.In general, this can occur when there is a genuine Cross Site Request Forgery, or when Django's CSRF mechanism has not been used correctly. For POST forms, you need to ensure:
- Your browser is accepting cookies.
- The view function uses
RequestContext
for the template, instead ofContext
.- In the template, there is a
{% csrf_token %}
template tag inside each POST form that targets an internal URL.- If you are not using
CsrfViewMiddleware
, then you must usecsrf_protect
on any views that use thecsrf_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 toFalse
, and only the initial error message will be displayed.You can customize this page using the CSRF_FAILURE_VIEW setting.
pop expected at least 1 arguments, got 0
i tryed the post from this page:
http://stackoverflow.com/questions/7678231/problems-with-csrf-token
now i have the error, when i press my send button, why is that?
here the error...--------------------------
TypeError at /kundendaten/
pop expected at least 1 arguments, got 0
Request Method: | POST |
---|---|
Request URL: | http://127.0.0.1:8000/kundendaten/ |
Django Version: | 1.4.1 |
Exception Type: | TypeError |
Exception Value: | pop expected at least 1 arguments, got 0 |
Exception Location: | C:\Python27\lib\site-packages\django\template\loader.py in render_to_string, line 178 |
Python Executable: | C:\Python27\python.exe |
Python Version: | 2.7.3 |