You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to access my own google calendar as part of a web application deployed
in django. To do this I got the credentials for my google account stored in a
file (called calendar.dat) which is in the same directory as as the views.py
file being used for the application. Is there a way to use this file to get my
credentials. Currently the code is:
from oauth2client.file import Storage
import os.path
import httplib2
module_dir = os.path.dirname(__file__)
file_path = os.path.join(module_dir, calendar.dat)
storage = Storage(file_path)
credentials = storage.get
http = httplib2.Http()
http = credentials.authorize(http)
However, this code returns credentials as None, so it doesn't work in views.py.
It does work however if I put it in a normal python file and just run it in the
terminal, as opposed to someone visiting the page in a web browser. Is there a
way to fix this?
Original issue reported on code.google.com by [email protected] on 15 Oct 2014 at 7:28
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 15 Oct 2014 at 7:28The text was updated successfully, but these errors were encountered: