from rest_framework_simplejwt.views import TokenObtainPairView from myapp.serializers import MyTokenObtainPairSerializer class MyTokenObtainPairView(TokenObtainPairView): serializer_class = MyTokenObtainPairSerializer
from rest_framework_simplejwt.views import TokenObtainPairView class MyTokenObtainPairView(TokenObtainPairView): passIn this example, we create a custom view class MyTokenObtainPairView that extends TokenObtainPairView with just the default settings. The package library used in these examples is Django Rest Framework SimpleJWT.