Published
- 1 min read
import status in django rest framework
The solution for this is noted below
import status in django rest framework
Solution
from rest_framework import status
from rest_framework.response import Response
def empty_view(self):
content = {'please move along': 'nothing to see here'}
return Response(content, status=status.HTTP_404_NOT_FOUND)
Try other methods by searching on the site. That is if this doesn’t work