I have viewset like below :
from rest_framework import viewsets
from paas.serializers import UserSerializer
import logging
logger= logging.getLogger(__name__)
class UserViewSet(viewsets.ViewSet):
def list(self,request):
pass
def create(self,request):
logger.info(request.data)
current_user = UserSerializer.create()
Also, I use the DRF Token based authentication in my code. How can I simply say that this create
method don't require authentications?
As you know after implementing authentication with the token, all request's should have Token
in header's, and any request that doesn't have will get 403 error.