79288069

Date: 2024-12-17 13:38:13
Score: 1.5
Natty:
Report link

When I first encounted the error and searched for how to disable whitenoise, I saw the setting below and used it while creting my settings/test.py file:

STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' 

Based however on my own base.py file, to successfully override it, I needed this:

STORAGES = {
    # Enable WhiteNoise's GZip and Brotli compression of static assets:
    # https://whitenoise.readthedocs.io/en/latest/django.html#add-compression-and-caching-support
    "staticfiles": {
        "BACKEND": 'django.contrib.staticfiles.storage.StaticFilesStorage',
    },
}

Switching the first for the later worked. I guess I made flawed assumptions about how the settings are read by Django!

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): When I
  • Low reputation (1):
Posted by: Del_Wiz