Initial commit: React + Django full-stack project setup
- Backend: Django 4.2 + DRF + JWT + GraphQL - Frontend: React 18 + MobX + styled-components - Deployment: Docker + Docker Compose + Nginx - Database: PostgreSQL support - Documentation: README, INIT, PROJECT_DOCS, TESTING
This commit is contained in:
11
backend/apps/api/views.py
Normal file
11
backend/apps/api/views.py
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
Reference in New Issue
Block a user