from rest_framework.decorators import api_view, permission_classes from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt # Create your views here. @api_view(["GET"]) @csrf_exempt def ping(request): content = {"message": "pong"} return JsonResponse(content)