Skip to content

Commit

Permalink
Upgrade to python 3.12 and django 5, update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
smartspot2 committed Jul 13, 2024
1 parent 48cc212 commit fb32141
Show file tree
Hide file tree
Showing 4 changed files with 415 additions and 598 deletions.
12 changes: 10 additions & 2 deletions csm_web/csm_web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@
AWS_DEFAULT_ACL = None
AWS_S3_VERIFY = True
AWS_QUERYSTRING_AUTH = False # public bucket
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"

STORAGES = {
"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage"},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
Expand All @@ -182,7 +188,9 @@

if DJANGO_ENV in (PRODUCTION, STAGING):
# Enables compression and caching
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
STORAGES["staticfiles"] = {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage"
}
WHITENOISE_MAX_AGE = 31536000 # one year

AUTHENTICATION_BACKENDS = (
Expand Down
Loading

0 comments on commit fb32141

Please sign in to comment.