
python
圈圈VV
这个作者很懒,什么都没留下…
展开
-
Flask通过make_response实现重定向
Flask通过make_response实现重定向app.route("/index")def index(): headers = { 'content-type':'text/plain', 'location':'http://www.baidu.com' } # 使浏览器识别返回内容为字符串而不是html response = make_response("<html></html>",301) #原创 2021-03-10 09:52:50 · 379 阅读 · 0 评论 -
函数参数注解
标题函数参数注解这是函数参数注解,告诉使用者应该怎样正确使用这个函数。比如:def add(x:int, y:int) -> int:return x + y这样的话IDE就知道参数的类型可以帮你补全原创 2021-03-09 13:51:16 · 121 阅读 · 0 评论