Google API Python客户端使用的Flask示例的Django等价物是什么?
我试图按照Google的API所描述的那样,使用Python应用程序启动并运行OAuth 他们仅使用烧瓶示例 在这种情况下,例如:Google API Python客户端使用的Flask示例的Django等价物是什么?,python,django,google-api,google-api-python-client,Python,Django,Google Api,Google Api Python Client,我试图按照Google的API所描述的那样,使用Python应用程序启动并运行OAuth 他们仅使用烧瓶示例 在这种情况下,例如: @app.route('/test') def test_api_request(): if 'credentials' not in flask.session: return flask.redirect('authorize') # Load credentials from the session. credentials = goog
@app.route('/test')
def test_api_request():
if 'credentials' not in flask.session:
return flask.redirect('authorize')
# Load credentials from the session.
credentials = google.oauth2.credentials.Credentials(
**flask.session['credentials'])
...
我怎么知道用什么替换Django应用程序中的**flask.session['credentials']
我仍在尝试做同样的事情,但没有烧瓶
对于flask.session,Django的等价物是什么
代码取自此处:您好,参考资料中几乎没有可用的资源。您可以使用这些链接找到一些帮助 此外,API指南还提供了一个工作示例应用程序 有关更多信息,请阅读