Skip to content

Commit

Permalink
Update deprecated setting for static storage (#95)
Browse files Browse the repository at this point in the history
So far, the variable for static storage in `settings.py` was called `STATICFILES_STORAGE`. Since Django 4.2, this is deprecated and now part of a dict called `STORAGES`.  See https://docs.djangoproject.com/en/5.1/ref/settings/#storages
  • Loading branch information
Qup42 authored Aug 15, 2024
1 parent f549b97 commit 16550fc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion qlever/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@

STATIC_VERSION = ""

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STORAGES = {
'default': {
# Django's default
'BACKEND': 'django.core.files.storage.FileSystemStorage'
},
'staticfiles': {
# Use WhiteNoise (https://whitenoise.readthedocs.io) for static file serving
'BACKEND': 'whitenoise.storage.CompressedManifestStaticFilesStorage'
},
}

try:
# Get git info from files in .git
Expand Down

0 comments on commit 16550fc

Please sign in to comment.