urls.py 858 B

123456789101112131415
  1. from django.conf.urls import url
  2. from rest_framework_jwt.views import obtain_jwt_token
  3. from rest_framework_jwt.views import refresh_jwt_token
  4. from . import views
  5. app_name = 'users'
  6. urlpatterns = [
  7. # url(r'^authorizations/$',obtain_jwt_token),#用户登录操作
  8. url(r'^authorizations/$',views.LoginView.as_view(),name="LoginView"),#用户登录操作
  9. url(r'^authorizationsrefresh/', refresh_jwt_token,name="refresh_jwt_token"),#刷新token
  10. url(r'^logininformation/$',views.LoginInformation.as_view(),name="LoginInformation"), # 获取用户信息
  11. # url(r'^register/$',views.RegisterView.as_view()), #用户注册
  12. # url(r'^login/$',views.Login.as_view()), # 渲染登录界面
  13. # url(r'^logininformation/$',views.LoginInformation.as_view()), # 获取用户信息
  14. # url(r'^logout/$',views.Logout.as_view()), # 退出登录
  15. ]