Forbidden (CSRF token missing or incorrect.):

2021. 1. 17. 17:45파이썬/Django

Client에는 아래와 같은 에러 발생

jquery.min.js:4 POST http://localhost/gantt/ajax/setData/ 403 (Forbidden)
send	@	jquery.min.js:4
ajax	@	jquery.min.js:4
saveGanttOnServer	@	2:281
onclick	@	2:1

[views.py] CSRF 셋팅으로 해결

from django.views.decorators.csrf import csrf_exempt

@csrf_exempt
def setData(request) :