11 lines
421 B
Python
11 lines
421 B
Python
|
|
from rest_framework import status
|
||
|
|
from rest_framework.decorators import api_view
|
||
|
|
from rest_framework.response import Response
|
||
|
|
from rest_framework_simplejwt.views import TokenObtainPairView
|
||
|
|
from .serializers import CustomTokenObtainPairSerializer
|
||
|
|
|
||
|
|
|
||
|
|
class CustomTokenObtainPairView(TokenObtainPairView):
|
||
|
|
"""Custom token view that returns user data with tokens."""
|
||
|
|
|
||
|
|
serializer_class = CustomTokenObtainPairSerializer
|