0

I have a Django_cms application. It runs correctly both locally and remotely once i deploy. My problem comes when i want to use whitenoise to manage staticfiles. Once i install white noise and adjust my settings.py file with the below details,

    BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))



STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
STATIC_URL = '/static/'

MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
MEDIA_URL = '/media/'


STATICFILES_DIRS = (
    os.path.join(PROJECT_ROOT, 'static'),
)
    STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'

and try to run the server i get the error below.

ValueError: The file 'filer/js/addons/popup_handling.js' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f9a96e45690>.

This error i get it on my local server and when i run heroku logs i get the same error.

Kindly assist.

Phares
  • 1,008
  • 13
  • 20
  • Have you solved it? I am facing the same issue. – sobolevn Oct 19 '16 at 12:08
  • I solved my problem using cling. White noise din't work for me.https://github.com/kennethreitz/dj-static – Phares Oct 21 '16 at 07:47
  • a similar question here. the owner advised me to use cling. http://stackoverflow.com/questions/37641233/django-whitenoise-storage-backend-causes-an-error – Phares Oct 21 '16 at 07:49
  • thanks, solved the issue with `whitenoise`. fixed my own issues with configuration. – sobolevn Oct 21 '16 at 11:46
  • @sobolevn how did you fix it? Can you please provide your solution? I am stuck with the problem too. – Özer Oct 25 '16 at 19:13
  • I had my `static_root` setting miss-configured. It was pointing to wrong directory. But as I said it was my specific problem. – sobolevn Oct 26 '16 at 09:12

0 Answers0