[Python] Python Flask框架下获取当前查询参数的代码 →→→→→进入此内容的聊天室

来自 , 2020-07-26, 写在 Python, 查看 100 次.
URL http://www.code666.cn/view/80b618eb
  1. from flask import Flask, render_template, request
  2.  
  3. # Initialize the Flask application
  4. app = Flask(__name__)
  5.  
  6. # This is a catch all route, to catch any request the user does,http://www.sharejs.com
  7. @app.route('/')
  8. def index():
  9.   qs = request.query_string
  10.   return render_template('index.html', query_string=qs)
  11.  
  12. if __name__ == '__main__':
  13.     app.run(
  14.         host="0.0.0.0",
  15.         port=int("80"),
  16.     )
  17. #//python/8889

回复 "Python Flask框架下获取当前查询参数的代码"

这儿你可以回复上面这条便签

captcha