You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
The values that are given to dj-libcloud from the settings files are configuration value objects, not strings. This causes all kinds of problems. Current mitigation is to replace SecretValues interacting with dj-libcloud with get_env_variable functions:
# Normally you should not import ANYTHING from Django directly# into your settings, but ImproperlyConfigured is an exception.fromdjango.core.exceptionsimportImproperlyConfigureddefget_env_variable(var_name):
"""Get the environment variable or return exception."""try:
returnos.environ[var_name]
exceptKeyError:
error_msg="Set the %s environment variable"%var_nameraiseImproperlyConfigured(error_msg)
classProduction(Common):
AWS_ACCESS_KEY_ID=get_env_variable("DJANGO_AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY=get_env_variable("DJANGO_AWS_SECRET_ACCESS_KEY")
AWS_STORAGE_BUCKET_NAME=get_env_variable("DJANGO_AWS_STORAGE_BUCKET_NAME")
The values that are given to dj-libcloud from the settings files are configuration value objects, not strings. This causes all kinds of problems. Current mitigation is to replace
SecretValuesinteracting with dj-libcloud withget_env_variablefunctions:Ping @jezdez.