Is there a way to configure django's collectstatic command to upload to a subdirectory in an s3 bucket, rather than just the top level directory?
Thanks
If you're using the S3BotoStorage engine from django-storages then there's a settings variable called AWS_LOCATION which will set the key prefix (equivalent to subdirectory) for the S3 bucket you specify in AWS_STORAGE_BUCKET_NAME.
Note that I haven't used this with collectstatic, but I can't see how it wouldn't work given the separation between it and the storage engines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With