-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I created the following configuration:
DEFAULT_FILE_STORAGE = 'django_minio_backend.storage.MinioBackend'
STORAGES = { # -- ADDED IN Django 5.1
"default": {
"BACKEND": "django_minio_backend.models.MinioBackend",
}
}
MINIO_ENDPOINT = 'localhost:9000/'
MINIO_ACCESS_KEY = 'there is real key'
MINIO_SECRET_KEY = 'there is real key'
MINIO_CONSISTENCY_CHECK_ON_START = True
MINIO_USE_HTTPS = False
MINIO_PRIVATE_BUCKETS = [
'images'
]
MINIO_MEDIA_FILES_BUCKET = 'images' # replacement for MEDIA_ROOT
MINIO_BUCKET_CHECK_ON_SAVE = True # Default: True // Creates bucket if missing, then save
But I got the following error indicating that I missed configuring staticfiles:
fn(*args, **kwargs)
~~^^^^^^^^^^^^^^^^^
File "C:\Users\KKK\AppData\Local\Programs\Python\Python313\Lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KKK\AppData\Local\Programs\Python\Python313\Lib\site-packages\django\apps\registry.py", line 124, in populate
app_config.ready()
~~~~~~~~~~~~~~~~^^
File "C:\Users\KKK\AppData\Local\Programs\Python\Python313\Lib\site-packages\django_minio_backend\apps.py", line 36, in ready
staticfiles_backend = storages["staticfiles"]["BACKEND"]
~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'staticfiles'
Metadata
Metadata
Assignees
Labels
No labels