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