I am super newbie on programming using django as a backend. I am making a login function with JWT (using simplejwt).
Trying to make it while watching simplejwt official doc, I don't know what is root urls.py means in doc.
In the first line of the above picture.
"root urls.py" === config/urls.py ??
Am I right...?
CodePudding user response:
That is just an example Best way for you is to do this way:
Use django terminal to create new authentication
app
after that just register your urls in main urls.py in project urls.py
incase you dont need any customization of JWT just encorporate your those urls in authentication urls file and hit your urls
so your urls will be like this
path('login/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
localhost:8000/api/login