mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-20 13:29:37 +02:00
7 lines
199 B
Python
7 lines
199 B
Python
|
from django.http import JsonResponse
|
||
|
from django.middleware.csrf import get_token
|
||
|
|
||
|
def get_csrf_token(request):
|
||
|
csrf_token = get_token(request)
|
||
|
return JsonResponse({'csrfToken': csrf_token})
|