from django.urls import path, include # Ajout du package manquant dans requirements.txt ou installez-le avec: # pip install djangorestframework-simplejwt from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, ) from .routers import router app_name = "api" urlpatterns = [ path("", include(router.urls)), path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), ]