1. hook
https://www.twblogs.net/a/5b80b2572b71772165a8cb2c
https://stackoverflow.com/questions/30514749/what-is-the-g-object-in-this-flask-code
https://codertw.com/%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80/360556/
2. g ojbect
g
is an object provided by Flask. It is a global namespace for holding any data you want during a single app context. For example, a before_request
handler could set g.user
, which will be accessible to the route and other functions.
https://flask.palletsprojects.com/en/2.0.x/appcontext/
https://stackoverflow.com/questions/30514749/what-is-the-g-object-in-this-flask-code
3. get post data
https://www.maxlist.xyz/2019/03/17/flask-get-post/
https://medium.com/seaniap/python-web-flask-get-post%E5%82%B3%E9%80%81%E8%B3%87%E6%96%99-2826aeeb0e28
沒有留言:
張貼留言