After running python manage.py collectstatic I'm getting the following AttributeError
Traceback (most recent call last):
File "/home/victor/BmLabs/site/manage.py", line 22, in <module>
main()
File "/home/victor/BmLabs/site/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/victor/.pyenv/versions/bmlabs/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/home/victor/.pyenv/versions/bmlabs/lib/python3.12/site-packages/django/core/management/__init__.py", line 382, in execute
settings.INSTALLED_APPS
File "/home/victor/.pyenv/versions/bmlabs/lib/python3.12/site-packages/django/conf/__init__.py", line 89, in __getattr__
self._setup(name)
File "/home/victor/.pyenv/versions/bmlabs/lib/python3.12/site-packages/django/conf/__init__.py", line 76, in _setup
self._wrapped = Settings(settings_module)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/victor/.pyenv/versions/bmlabs/lib/python3.12/site-packages/django/conf/__init__.py", line 262, in __init__
self.STORAGES.get(STATICFILES_STORAGE_ALIAS, {}).get("BACKEND"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'
As per the guide I've set the staticfiles key to storages.backends.gcloud.GoogleCloudStorage.
I'm trying to configure Django (5.0.4) to use Google Cloud S3 as my file storage using django-stores.
Here is what my settings.py configuration for object storage looks like:
After running
python manage.py collectstatic
I'm getting the following AttributeErrorAs per the guide I've set the
staticfiles
key tostorages.backends.gcloud.GoogleCloudStorage
.