What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-21 04:16:03
csrf token exempt django
from django.views.decorators.csrf import csrf_exempt @csrf_exempt def xyx(request): #your code #this makes the function accept post request without csrf token #use it just for quick check or for operations where csrftoken authentication #isn't required Add solution -
Python 2021-08-27 16:54:01
django forbidden (csrf cookie not set.)
# Error: forbidden (csrf cookie not set.) # ------------------------- SOLUTIONS ----------------------------- # 1º - In your views.py file: def funtion(request): var = request.POST['name_from_element'] #instead of GET ... 2º -... Add solution