Hi Andrzej, CachedStaticFilesStorage requires you run `collectstatic` before deploying your application in production (non-DEBUG) mode.
The deployment should look like that: 1) Update your code to the latest version. 2) Run `collectstatic` to cache paths to hashed versions of your assets. 3) Restart your server. Simon Le vendredi 8 janvier 2016 09:19:30 UTC-5, Andrzej Mateja a écrit : > > Hi, > > I have a problem with using CachedStaticFilesStorage as a > STATICFILES_STORAGE and with external package containing its own static > files (easy_select2 to be specific). If I deploy my project for the very > first time with DEBUG = False, empty cache and no external package static > files copied to STATIC_ROOT I got an exception: *ValueError: The file > 'easy_select2/js/init.js' could not be found with > <django.contrib.staticfiles.storage.CachedStaticFilesStorage object at > 0xffffffffffff>*. with every manage.py command, especially collectstatic. > I understand that behaviour of HashedFilesMixin is legit but I'm not so > sure if it should be like that when I want to collect my static files. > > As a workaround I set temporally DEBUG = True, run manage.py > collectstatic, set DEBUG back to False and do the rest. But I have a > feeling that it is not the right way to do it especially because there is > no problem when StaticFilesStorage is used - no need to do such tricks. > > Best regards > Andrzej > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6d5decd3-f74a-48bb-aeec-414c91237296%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

