#BasePermission

Django Rest Framework组件:权限模块BasePermission

这里给出局部配置写法,全局配置需要在setting文件中写入。urls.pyfromdjango.conf.urlsimporturl,includefrom应用名.viewsimportTestViewurlpatterns=[url(r'^test/',TestView.as_view()),]views.py#!...