Re: collectstatic content hash

2020-07-12 Thread '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
Sorry, just figured Django already has that !
https://docs.djangoproject.com/en/3.0/ref/contrib/staticfiles/#manifeststaticfilesstorage

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/OJE7hXfbGMhy5tx41Cdvm1Uui4aFLRAiNl9rdIEESTmJcCpWgKtJNUG-36lwaOJgBHUNwg1G4XbDLM_H084G61I_69X-ZLfApwQ3HncgAzQ%3D%40protonmail.com.


collectstatic content hash

2020-07-12 Thread '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
Currently, if yourscript.js is served with {% static 'yourscript.js' %}, you 
open the page in your browser, then change some HTML and yourscript.js and 
redeploy, reload the page without refreshing browser cache manually then you 
will see the new HTML with the old version of yourscript.js.

This seems to be a problem that collectstatic and {% static %} could solve:

1. collectstatic adds the script content has in the filename of the file it 
copies
2. collectstatic removes the previous version from the static root, if any
3. {% static %} will find the right file name with the content hash (there 
should only be one thanks to 2.)

What do you think ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/Mq2gOv-t_mc5rg4ESgFFp9Ox6HxKggLaOMnEH1DBbC72Na1_rdgNxMUko6Z3_K8fjIod1aaSKApVSo9cnkYuvxO5tmICSlZ-myBT7qjY7NI%3D%40protonmail.com.