Closed Ethra8 closed 1 month ago
pip install whitenoise
python manage.py collectstatic
Further on the development of the site, I re-encountere the same issue, and a tutor helped me solve the issue, which apparently is related to Django 5.1 changes, so the settings.py file was updated as follows:
# DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage'
# # Optional, for static files
# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
# All the above replaced in Django 5.1 to 'STORAGES':
STORAGES = {
"default": {
"BACKEND": "cloudinary_storage.storage.MediaCloudinaryStorage",
},
"staticfiles": {"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage"},
}```