Skip to content

Commit

Permalink
chore: update code for configuring static file storage
Browse files Browse the repository at this point in the history
replace deprecated approach with new STORAGE setting
  • Loading branch information
angela-tran committed Apr 4, 2023
1 parent 693eec7 commit 41f2504
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions benefits/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ def _filter_empty(ls):
STATIC_URL = "/static/"
STATICFILES_DIRS = [os.path.join(BASE_DIR, "benefits", "static")]
# use Manifest Static Files Storage by default
STATICFILES_STORAGE = os.environ.get(
"DJANGO_STATICFILES_STORAGE", "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
)
STORAGES = {
"staticfiles": {
"BACKEND": os.environ.get(
"DJANGO_STATICFILES_STORAGE", "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
)
}
}
STATIC_ROOT = os.path.join(BASE_DIR, "static")

# Logging configuration
Expand Down

0 comments on commit 41f2504

Please sign in to comment.