Skip to content

Commit

Permalink
WIP: Trying to setup WhiteNoise in production on DigitalOcean
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorbaptista committed Sep 20, 2024
1 parent 92b35a2 commit a1c5ced
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,30 @@

# FIXME: This is a workaround because WhiteNoise's files storage raises error 500.
# http://whitenoise.evans.io/en/stable/django.html#troubleshooting-the-whitenoise-storage-backend
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
# STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"

DJANGO_LIVESYNC = {
"HOST": "localhost",
"PORT": 9001,
}

LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"console": {
"class": "logging.StreamHandler",
},
},
"loggers": {
"django": {
"handlers": ["console"],
"propagate": True,
"level": "DEBUG",
},
"whitenoise": {
"handlers": ["console"],
"level": "DEBUG",
},
},
}

0 comments on commit a1c5ced

Please # to comment.