Django collectstatic from Heroku pushes to S3 everytime

前端 未结 6 1312
忘了有多久
忘了有多久 2021-02-02 01:23

I\'m using django-storages for static files with S3 (and S3BotoStorage). When I do collectstatic from my local machine, the behaviour is as expected, where only modified files a

6条回答
  •  有刺的猬
    2021-02-02 01:58

    I strongly recommend using the collectfast package for any django static deployment to s3, whether local or from your heroku server. It ignores modified dates and utilizes md5 hashes, which the s3 api will provides very quickly, and (optional) caching to make your static deployments zoom. It took my static deployments from ~10-15 minutes to < 2 minutes and only deploys the files that have actually changed.

提交回复
热议问题