AWS_S3_HOST = "{{ MINIO_HOST }}" AWS_S3_USE_SSL = {{ "True" if ACTIVATE_HTTPS else "False" }} AWS_S3_SECURE_URLS = {{ "True" if ACTIVATE_HTTPS else "False" }} AWS_S3_CALLING_FORMAT = "boto.s3.connection.OrdinaryCallingFormat" AWS_AUTO_CREATE_BUCKET = False # explicit is better than implicit # Configuring boto is required for ora2 because ora2 does not read # host/port/ssl settings from django. Hence this hack. # http://docs.pythonboto.org/en/latest/boto_config_tut.html import os os.environ["AWS_CREDENTIAL_FILE"] = "/tmp/boto.cfg" with open("/tmp/boto.cfg", "w") as f: f.write("""[Boto] is_secure = {{ "True" if ACTIVATE_HTTPS else "False" }} [s3] host = {{ MINIO_HOST }} calling_format = boto.s3.connection.OrdinaryCallingFormat""")