Better paths on S3
[oweals/karmaworld.git] / karmaworld / settings / vmdev.py
index d83a3810cdc5322cd61c152c3d80227384a4f1d8..9c1eb1b9b366f14f0d0c777b84931655167be8ca 100644 (file)
@@ -131,6 +131,10 @@ STATICFILES_STORAGE = DEFAULT_FILE_STORAGE
 # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
 AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
 
+# Put static files in the folder 'static' in our S3 bucket.
+# This is so they have the same path as they do when served
+# locally for development.
+AWS_LOCATION = 'static'
 
 # AWS cache settings, don't change unless you know what you're doing:
 AWS_EXPIREY = 60 * 60 * 24 * 7
@@ -140,7 +144,7 @@ AWS_HEADERS = {
 }
 
 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
-STATIC_URL = S3_URL
+STATIC_URL = CLOUDFRONT_URL + '/' + AWS_LOCATION + '/'
 ########## END STORAGE CONFIGURATION