摘要: 一、token 1、签发token 1)源码: # 前提:给一个局部禁用了所有 认证与权限 的视图类发送用户信息得到token,其实就是登录接口 # 1)rest_framework_jwt.views.ObtainJSONWebToken 的 父类 JSONWebTokenAPIView 的 po 阅读全文
posted @ 2019-10-27 17:46 小王八+1 阅读(310) 评论(0) 推荐(0)
摘要: 安装 # >: pip install https://codeload.github.com/sshwsfc/xadmin/zip/django2 配置文件注册app: INSTALLED_APPS = [ # ... # xamin主体模块 'xadmin', # 渲染表格模块 'crispy_ 阅读全文
posted @ 2019-10-27 17:45 小王八+1 阅读(142) 评论(0) 推荐(0)
摘要: https://github.com/ottoyiu/django-cors-headers/ 安装django-cors-headers模块 在settings.py中配置# 注册appINSTALLED_APPS = [ ... 'corsheaders']# 添加中间件MIDDLEWARE = 阅读全文
posted @ 2019-10-27 17:39 小王八+1 阅读(120) 评论(0) 推荐(0)