Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
adds s3 file storage
Browse files Browse the repository at this point in the history
  • Loading branch information
dmorina committed May 19, 2016
1 parent 3f1df55 commit 0159d2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions csp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,14 @@
MTURK_THRESHOLD = 0.61
POST_TO_MTURK = os.environ.get('POST_TO_MTURK', True)


# AWS
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', '')
AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME', 'daemo')
AWS_S3_FILE_OVERWRITE = False

# Celery
BROKER_URL = REDIS_URL
CELERY_RESULT_BACKEND = REDIS_URL
Expand Down
2 changes: 2 additions & 0 deletions local_settings_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
}

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ djangorestframework==3.3.1
django-redis-sessions==0.5.0
dj-redis-url==0.1.4
dj-static==0.0.6
django-storages-redux==1.3.2
django-toolbelt==0.0.1
django-websocket-redis==0.4.6
dropbox==3.23
Expand Down

0 comments on commit 0159d2e

Please sign in to comment.