First time here? Check out the FAQ!

Revision history  [back]

CachedStaticFilesStorage and /media/style/tinymce

I'm integrating Askbot into an existing project that uses the CachedStaticFilesStorage backend for the staticfiles app.

Whenever I try to run manage.py collectstatic, I get the error:

ValueError: The file 'default/media/style/tinymce/img/items.gif' could not be found with <django.contrib.staticfiles.storage.CachedStaticFilesStorage object at 0x6a2b750>.

This error occurs because the CachedStaticFilesStorage backend attempts to replace file paths in CSS url functions with their cached counterparts. When collectstatic reaches media/style/tinymce/content.css, it tries to process line 12, which contains:

url(img/items.gif)

...and promptly fails, because img/items.gif does not exist relative to this file! This file also contains a bunch of other urls which point to file paths that don't exist, relatively.

Tinymce's styles are also found in /media/style/js/tinymce/themes/advanced/skins in several subdirectories. Removing the /media/style/tinymce directory allowed collecstatic to run, and also didn't seem to affect the styling of Tinymce at all.

Why is it that Tinymce's styles have been copied to /media/style?

CachedStaticFilesStorage and /media/style/tinymce

I'm integrating Askbot into an existing project that uses the CachedStaticFilesStorage backend for the staticfiles app.

Whenever I try to run manage.py collectstatic, I get the error:

ValueError: The file 'default/media/style/tinymce/img/items.gif' could not be found with <django.contrib.staticfiles.storage.CachedStaticFilesStorage object at 0x6a2b750>.

This error occurs because the CachedStaticFilesStorage backend attempts to replace file paths in CSS url functions with their cached counterparts. When collectstatic reaches media/style/tinymce/content.css, it tries to process line 12, which contains:

url(img/items.gif)

...and promptly fails, because img/items.gif does not exist relative to this file! This file also contains a bunch of other urls which point to file paths that don't exist, relatively.

Tinymce's styles are also found in /media/style/js/tinymce/themes/advanced/skins in several subdirectories. Removing the /media/style/tinymce directory allowed collecstatic to run, and also didn't seem to affect the styling of Tinymce at all.

Why is it that Tinymce's styles have been copied to /media/style?