python - Authorizing your own google account in django using oauth2 -
python - Authorizing your own google account in django using oauth2 -
i trying set django app needs access own (not user's) google calendar. i'd rather not have go through whole oauth process this, set authentication in file (called calendar.dat) in same directory django view uses calendar. code authorize business relationship follows:
import os.path import httplib2 oauth2client.file import storage module_dir = os.path.dirname(__file__) file_path = os.path.join(module_dir, 'calendar.dat') storage = storage(file_path) credentials = storage.get() http = hhtplib2.http() http = credentials.authorize(http) when code runs through phone call browser error credentials = none. however, if set code in normal python file in same directory , run in terminal works. there django messing , there way can prepare this? of beginner, sorry if novice question.
python django oauth-2.0
Comments
Post a Comment