From: Bryan Date: Thu, 19 Dec 2013 09:05:49 +0000 (-0500) Subject: fixing the example drive.py, properly importing it, and supporting it on VM upstart X-Git-Tag: release-20150131~379 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fec5102ce60a70c6c1f6ec35db71611a206d27a1;p=oweals%2Fkarmaworld.git fixing the example drive.py, properly importing it, and supporting it on VM upstart --- diff --git a/fabfile.py b/fabfile.py index 1e9e164..6d9bd8f 100644 --- a/fabfile.py +++ b/fabfile.py @@ -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: diff --git a/karmaworld/apps/notes/gdrive.py b/karmaworld/apps/notes/gdrive.py index 531df01..dc9242c 100644 --- a/karmaworld/apps/notes/gdrive.py +++ b/karmaworld/apps/notes/gdrive.py @@ -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'] diff --git a/karmaworld/secret/drive.py.example b/karmaworld/secret/drive.py.example index 2d2942e..43c87ec 100644 --- a/karmaworld/secret/drive.py.example +++ b/karmaworld/secret/drive.py.example @@ -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')