From 8514d89e1aca677ad538fa90d4b354069d80b8d5 Mon Sep 17 00:00:00 2001 From: Kristof Daja Date: Mon, 19 Jul 2021 23:45:03 +0200 Subject: [PATCH] Support for STATIC and MEDIA files - Updated the __init__ of `MinioBackend` to meet Django's custom storage system requirements "Django must be able to instantiate your storage system without any arguments" The `MinioBackend` class can be used as a value for `DEFAULT_FILE_STORAGE` - MinioBackendStatic: A new subclass of `MinioBackend` for supporting django-minio-backend as a static files storage - Added missing docstrings throughout the project - DjangoExampleApplication extended by `class GenericAttachment` for demonstrating a `FileField` without an explicit storage backend - DjangoExampleProject settings.py has been extended with the following new values: - MINIO_MEDIA_FILES_BUCKET - MINIO_STATIC_FILES_BUCKET - Updated README.md --- django_minio_backend/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_minio_backend/models.py b/django_minio_backend/models.py index 15e4da7..d2849b9 100644 --- a/django_minio_backend/models.py +++ b/django_minio_backend/models.py @@ -300,7 +300,7 @@ def same_endpoints(self) -> bool: @property def bucket(self) -> str: """Get the configured bucket's [self.bucket] name""" - return self.bucket + return self._BUCKET_NAME @property def is_bucket_public(self) -> bool: