Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PipelineCachedStorage generated versioned files to late. #686

Open
ceasaro opened this issue Feb 28, 2019 · 2 comments
Open

PipelineCachedStorage generated versioned files to late. #686

ceasaro opened this issue Feb 28, 2019 · 2 comments

Comments

@ceasaro
Copy link

ceasaro commented Feb 28, 2019

We use javascript files with the tag template {% static 'my_image.jpg' %} (from {% load static %}).
The problem with the current PipelineCachedStorage implementation is that this storage first the collects the pipeline bundled files and does later on a super call to collect the other static files.

When it hits the {% static 'my_image.jpg' %}, it looks for a versioned file called my_image.3b1f39551527.jpg, but this files still does not exists. It will only be generated once the call to the super_class.post_process(...) is done.

Is this done deliberated? or can the PipelineCachedStorage be changed to first collect the django static files (super_class.post_process(...)) and afterwards collect the pipeline bundles?

May be related to: #638 and #462.

@ceasaro
Copy link
Author

ceasaro commented Mar 1, 2019

I realized now that the pipeline bundles also need a version generated and this can only be done after the bundles are created. Is there a anyway you can generate versioned files for all direct static files and after the pipeline bundles are created only create versioned files for these bundled pipeline files?

@Pyvonix
Copy link

Pyvonix commented May 23, 2020

Django recommends to use ManifestStaticFilesStorage instead of CachedStaticFilesStorage and in the last Django version, CachedStaticFilesStorage was removed.

Now use PipelineManifestStorage who will use ManifestStaticFilesStorage. It will revolve many problems with file versioning generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants