Skip to content

Commit

Permalink
only modify cabotage_settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Jul 10, 2024
1 parent f7f74d7 commit 8b813a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions speed_python/cabotage_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@

COMPRESS_ENABLED = True

MIDDLEWARE = MIDDLEWARE + ['whitenoise.middleware.WhiteNoiseMiddleware']
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"

_DATA_ROOT = os.environ.get("DJANGO_DATA_ROOT", "/srv/data")
MEDIA_ROOT = _DATA_ROOT + "/media"
STATIC_ROOT = _DATA_ROOT + "/site_media/static"
Expand Down
7 changes: 2 additions & 5 deletions speed_python/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,19 @@
# XXX Set SECRET_KEY in local_settings.py
#with open(os.path.join(BASEDIR, 'secret_key')) as f:
# SECRET_KEY = f.read().strip()
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY")

TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE = (
MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
)
]

if DEBUG:
import traceback
Expand Down Expand Up @@ -116,7 +114,6 @@ def process_exception(self, request, exception):
STATICFILES_DIRS = (
os.path.join(BASEDIR, 'static'),
)
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"

# Codespeed settings that can be overwritten here.
from codespeed.settings import *

0 comments on commit 8b813a2

Please sign in to comment.