fixing the example drive.py, properly importing it, and supporting it on VM upstart
authorBryan <btbonval@gmail.com>
Thu, 19 Dec 2013 09:05:49 +0000 (04:05 -0500)
committerBryan <btbonval@gmail.com>
Thu, 19 Dec 2013 09:05:49 +0000 (04:05 -0500)
fabfile.py
karmaworld/apps/notes/gdrive.py
karmaworld/secret/drive.py.example

index 1e9e1642aa3fc9effe219a5e47806abe9c638e71..6d9bd8fa952b778e45151dd1e3848ffd3accb773 100644 (file)
@@ -255,7 +255,7 @@ def check_secrets():
     """
 
     secrets_path = env.code_root + '/karmaworld/secret'
-    secrets_files = ('filepicker.py', 'static_s3.py', 'db_settings.py', 'drive.py', 'client_secrets.json')
+    secrets_files = ('filepicker.py', 'static_s3.py', 'db_settings.py', 'drive.py', 'client_secrets.json', 'drive.p12')
 
     errors = []
     for sfile in secrets_files:
index 531df0198dc8f7bc31b46a3eda6f5721af673110..dc9242c9a8acb181551d04031be101501d45c7fe 100644 (file)
@@ -13,7 +13,7 @@ from apiclient.http import MediaInMemoryUpload
 from django.core.files.base import ContentFile
 from oauth2client.client import SignedJwtAssertionCredentials
 
-import secrets.drive as drive
+import karmaworld.secret.drive as drive
 
 
 PPT_MIMETYPES = ['application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation']
index 2d2942edbc0c246fc3c500d74a6991e59af1f093..43c87ec78e23671ffdc6cd7ab97432783f9d4591 100644 (file)
@@ -7,6 +7,11 @@ that file.
 DO NOT check drive.py into source control.
 """
 
+import os
+
+from django.conf import settings
+
+
 CLIENT_SECRET = os.path.join(settings.DJANGO_ROOT, \
                              'path/to/client_secrets.json')