tkaemming/django-staticutils

add "generatestatic" management command

Opened this issue · 0 comments

add the ability to embed the version hash in the filename and dump the resulting file in STATIC_ROOT (or a custom directory to allow compatibility with alternative static storage engines)

for example, a file logo.png with a content hash of 5eb63bbb would currently get a cache busted URL of logo.png?5eb63bbb, but it would be ideal for the URL to become logo.5eb63bbb.png so multiple versions could exist on a CDN at the same time for rolling deploys (or faster rollbacks). for this to work, a new file with that filename will need to be generated so there's something to move when collectstatic is ran.