I have searched and reconfigured my project so many times. I have created new AWS accounts but am still having the same issue.
python manage.py collectstatic
keeps reverting to an old folder I used while using whitenoise. i have commented out the whitenoise middleware and the whitenoise from apps i installed boto3, django-storages..
each time i run collectstatic it creates a new directory staticfiles and displays
286 static files copied to '/home/user/Documents/django-project/staticfiles', 841 post-processed.
I tried the command python manage.py collectstatic --noinput --clear
but get the same output.
my AWS S3 bucket config for Django
# AWS service variables
AWS_SECRET_KEY_ID = config('AWS_SECRET_KEY_ID')
AWS_SECRET_ACCESS_KEY = config('AWS_SECRET_ACCESS_KEY')
AWS_STORAGE_BUCKET_NAME = config('AWS_STORAGE_BUCKET_NAME')
AWS_S3_CUSTOM_DOMAIN = 'd1l47x08equ47x.cloudfront.net'
AWS_S3_OBJECT_PARAMETERS = {
'CacheControl': 'max-age=86400',
}
AWS_S3_FILE_OVERWRITE = False
AWS_DEFAULT_ACL = None
AWS_LOCATION = 'static'
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
STATIC_URL = 'https://%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION)
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
Nothing happens when I run collect static.