Solution:
from rest_framework_simplejwt.views import (
TokenObtainPairView,
TokenRefreshView,
)
path('get_csrftoken_angular/', TokenObtainPairView.as_view(), name='get_csrftoken_angular'),
re_path(r'^refresh-token/', TokenRefreshView.as_view(), name='refresh-token'),
In a new branch, I made several changes to use modern code, in line with the new version of Django and Python, such as changing “url(r’pattern_url’, blablabla” to “re_path(r’', blablabla)”. Now, I need to know how to change this code snippet below, since instead of “djangorestframework-jwt==1.11.0” I’m using “djangorestframework-simplejwt”:
from rest_framework_jwt.views import obtain_jwt_token
from rest_framework_jwt.views import refresh_jwt_token