why static files not added to storage

here are the settings that i did but no luck!

PROJECT_ROOT = os.path.dirname(os.path.abspath(file))
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

LINODE_BUCKET=os.environ.get('LINODE_BUCKET', 'cfe2')
LINODE_BUCKET_REGION=os.environ.get('LINODE_BUCKET_REGION', 'ap-south-1')
LINODE_BUCKET_ACCESS_KEY=os.environ.get('LINODE_BUCKET_ACCESS_KEY', '?????????????????????')
LINODE_BUCKET_SECRET_KEY=os.environ.get('LINODE_BUCKET_SECRET_KEY', '????????????????????????')

AWS_S3_ENDPOINT_URL=f'https://{LINODE_BUCKET_REGION}.linodeobjects.com'
AWS_ACCESS_KEY_ID=LINODE_BUCKET_ACCESS_KEY
AWS_SECRET_ACCESS_KEY=LINODE_BUCKET_SECRET_KEY
AWS_S3_REGION_NAME=LINODE_BUCKET_REGION
AWS_S3_USE_SSL=True
AWS_STORAGE_BUCKET_NAME=LINODE_BUCKET

i went to check after i did:
python manage.py collectstatic --noinput

still don't have it uploaded in linode!

1 Reply

Hi @rwahdan - Things looks good just on the surface of it, but I'd recommend checking to see it was actually able to get the keys it needed to upload.

Other than that, I noticed this line has an extra 'f' at the start of the URL, is this intended?

AWS_S3_ENDPOINT_URL=f'https://{LINODE_BUCKET_REGION}.linodeobjects.com'

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct