from atexit import register from django.urls import path from rest_framework_simplejwt.views import (TokenObtainPairView, TokenRefreshView) from apps.auth1.views import CodeLogin, LoginView, LogoutView, PwResetView, SendCode, TokenBlackView, WxLogin, WxmpLogin API_BASE_URL = 'api/auth/' urlpatterns = [ path(API_BASE_URL + 'token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path(API_BASE_URL + 'token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path(API_BASE_URL + 'token/black/', TokenBlackView.as_view(), name='token_black'), path(API_BASE_URL + 'login/', LoginView.as_view(), name='session_login'), path(API_BASE_URL + 'login_wxmp/', WxmpLogin.as_view(), name='login_wxmp'), path(API_BASE_URL + 'login_wx/', WxLogin.as_view(), name='login_wx'), path(API_BASE_URL + 'login_sms_code/', CodeLogin.as_view(), name='login_sms_code'), path(API_BASE_URL + 'sms_code/', SendCode.as_view(), name='sms_code_send'), path(API_BASE_URL + 'logout/', LogoutView.as_view(), name='session_logout'), path(API_BASE_URL + 'reset_password/', PwResetView.as_view(), name='reset_password'), ]