上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页
摘要: 文档地址:https://doc.yuntongxun.com/p/5a533de33b8496dd00dce07c 文档原文: 2 发送模板短信接口 2.1 请求地址 POST /2013-12-26/Accounts/{accountSid}/SMS/TemplateSMS?sig={SigPa 阅读全文
posted @ 2021-12-13 21:07 linuxTang 阅读(64) 评论(0) 推荐(0)
摘要: 文档地址:https://doc.yuntongxun.com/p/5a533de33b8496dd00dce07c 第一部分文档内容: 1 概述 1.1 业务流程说明 1.2 Base URL 模板短信API引用的地址有Base URL。 生产环境的Base URL:https://app.clo 阅读全文
posted @ 2021-12-13 17:27 linuxTang 阅读(127) 评论(0) 推荐(0)
摘要: 1基础知识: 方法装饰器:用在类的函数里 函数装饰器:直接用在函数上 把方法装饰器转换成函数装饰器的方法是使用@method_decorator()工具 2搭建方法装饰器的架子国定写法: def logging_check(func): def wrap(request, *args, **kwar 阅读全文
posted @ 2021-12-13 13:29 linuxTang 阅读(234) 评论(0) 推荐(0)
摘要: 前后端分离项目实现会话保持的原理 1后端生成令牌并将令牌响应给前端 2前端从响应结果中拿到令牌,然后把令牌和需要变动的数据一起发送给后端 3后端接收到请求后对令牌进行解密,如果正确就执行存储,否则就驳回 示例讲解: 一后端: 1后端生成令牌并将令牌响应给前端 1在setting里为jwt配置一个密钥 阅读全文
posted @ 2021-12-13 13:29 linuxTang 阅读(203) 评论(0) 推荐(0)
摘要: 一完成个人信息展示页: 1前端地址规划: 个人信息展示页url: h t t p : / / 1 2 7 . 0 . 0 . 1 : 5 0 0 0 /< u s e r n a m e > / i n f o 2后端配置路由: #主路由 path('v1/users/', include('use 阅读全文
posted @ 2021-12-12 22:42 linuxTang 阅读(133) 评论(0) 推荐(0)
摘要: jwt全称json web token,用于认证用户身份信息的,即保持会话状态 安装pip install pyjwt 方法参数说明返回值 encode(payload, key, algorithm) payload:字典类型的私有声明和公有声明,例如:{'username':'zhangsan' 阅读全文
posted @ 2021-12-12 16:08 linuxTang 阅读(117) 评论(0) 推荐(0)
摘要: 一,json.load()和json.dump只要用于读写json数据 1json.load() 从文件中读取json字符串 with open('data.json','r',encoding='utf-8') as f print(json.load(f)) 2json.dump() 将json 阅读全文
posted @ 2021-12-12 10:48 linuxTang 阅读(706) 评论(0) 推荐(0)
摘要: 一后端: 1创建应用: 会话保持需要后端创建一个令牌给前端,下次前端再请求访问时带上没有过期的令牌即可,因此我们单拎出来一个应用专门处理会话保持 D:\PycharmProjects\linuxTangblog>python manage.py startapp dtoken 2注册应用: INST 阅读全文
posted @ 2021-12-11 20:03 linuxTang 阅读(50) 评论(0) 推荐(0)
摘要: 1完善django后端用户注册视图逻辑 import json from django.http import JsonResponse from django.shortcuts import render from django.views import View from .models im 阅读全文
posted @ 2021-12-11 17:19 linuxTang 阅读(58) 评论(0) 推荐(0)
摘要: 一,前端: 1先拿到前端模板页面然后用flask跑起来: register.html链接:https://pan.baidu.com/s/1mlXu3dC6y3ir4rM19_PW0Q jquery.min.js链接:https://pan.baidu.com/s/1XVY4xni3f7yYbY8a 阅读全文
posted @ 2021-12-11 15:59 linuxTang 阅读(111) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页