Paul Bailey
http://bit.ly/pydrive
Example Google Drive Apps
In [1]:
# in local_settings.py...
PRIV_GOOGLE_API_CLIENT_ID = '...'
PRIV_GOOGLE_API_CLIENT_SECRET = '...'
In [ ]:
from google.appengine.ext import db
from oauth2client.appengine import CredentialsProperty
class Credentials(db.Model):
credentials = CredentialsProperty()
created = db.DateTimeProperty(auto_now_add=True)
# in settings.py...
# you generally try to use the least permissive scopes you need
# don't ask for the full drive unless you absolutely need to
ALL_SCOPES = (
'...',
'...',
)
In your views, you'd have a view to redirect the user to the Google login page if the don't have a cookie with the OAuth token.