Created
August 27, 2020 01:13
-
-
Save BrockHerion/90b68487565eadbdbb5e4e3e60df1359 to your computer and use it in GitHub Desktop.
URLs for Django Rest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.urls import path | |
from rest_framework_simplejwt import views as jwt_views | |
from .views import ( | |
UserRegistrationView, | |
UserLoginView, | |
UserListView | |
) | |
urlpatterns = [ | |
path('token/obtain/', jwt_views.TokenObtainPairView.as_view(), name='token_create'), | |
path('token/refresh/', jwt_views.TokenRefreshView.as_view(), name='token_refresh'), | |
path('register', UserRegistrationView.as_view(), name='register'), | |
path('login', UserLoginView.as_view(), name='login'), | |
path('users', UserListView.as_view(), name='users') | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment