You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_django/minio_backend/storage.py

25 lines
685 B
Python

from django_minio_backend.models import MinioBackend
print("Loading MinioStaticStorage class")
class MinioMediaStorage(MinioBackend):
def __init__(self):
super().__init__(bucket_name='damages')
def get_default_acl(self):
return 'public-read-write'
from django.conf import settings
class MinioStaticStorage(MinioBackend):
def __init__(self):
bucket_name = settings.MINIO_STORAGE_STATIC_BUCKET_NAME
print(f"Initializing MinioStaticStorage with bucket '{bucket_name}'")
super().__init__(bucket_name=bucket_name)
def get_default_acl(self):
print("Setting ACL to public-read-write")
return 'public-read-write'