rest-framework生成token

时间:2020-08-03 21:39:29
【文件属性】:
文件名称:rest-framework生成token
文件大小:24KB
文件格式:ZIP
更新时间:2020-08-03 21:39:29
django token 使用rest-framework在django中创建和认证token,用于在移动端来认证和用户,本文通过自己编写模型来实现根据用户来生成token,在请求头中添加Authentication来进行认证,保持登录状态。可以直接使用,编写过程可以查看本人博客https://blog.csdn.net/lwuis_/article/details/107771954。
【文件预览】:
drf_token_demo
----db.sqlite3(140KB)
----manage.py(561B)
----drf_token_demo()
--------settings.py(3KB)
--------urls.py(944B)
--------__pycache__()
--------__init__.py(0B)
--------wsgi.py(421B)
----.idea()
--------workspace.xml(6KB)
--------misc.xml(304B)
--------modules.xml(287B)
--------inspectionProfiles()
--------drf_token_demo.iml(1KB)
----account()
--------admin.py(66B)
--------models.py(60B)
--------migrations()
--------utils.py(3KB)
--------tests.py(63B)
--------__pycache__()
--------__init__.py(0B)
--------apps.py(94B)
--------views.py(1KB)
----templates()

网友评论