urls.py 663 B

123456789101112
  1. from django.conf.urls import url
  2. from . import views
  3. from rest_framework_jwt.views import refresh_jwt_token
  4. app_name = 'topdev'
  5. urlpatterns = [
  6. # get--retrieve,查看单个 get--list,查看列表 post--create,创建单个 put--update,修改单个 delete--destroy,删除单个
  7. # url(r'^users/$',views.UserViewList.as_view({'get': 'list',"post":"create"})), #查看全部用户和新增
  8. # url(r'^users/(?P<pk>\d+)/$',views.UserView.as_view({'get': 'retrieve',"put":"update","delete":"destroy"})), #用户注册操作
  9. # url(r'^login/$',views.LoginView.as_view()),#用户登录
  10. # url(r'^loginrefresh/', refresh_jwt_token),#刷新token
  11. ]