Fixing URL bug with environment values

This commit is contained in:
Burhan Khalid 2014-07-20 22:04:26 +03:00
parent 393780b3f1
commit c8ee217dd7

View File

@ -360,7 +360,11 @@ class Production(Common):
} }
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME # A hack to fix this, because the default __repr__ of values will return <Value Default: foo>
# if foo is the default, or whatever the value of the environment variable.
# This causes the URL to be https://s3.amazonaws.com/&lt;Value%20Default:%20foo%gt;/
# @burhan 2014-07-20
STATIC_URL = 'https://s3.amazonaws.com/%s/' % (AWS_STORAGE_BUCKET_NAME.setup('DJANGO_AWS_BUCKET_NAME'),)
########## END STORAGE CONFIGURATION ########## END STORAGE CONFIGURATION
########## EMAIL ########## EMAIL