Skip to content

Commit df97de8

Browse files
committed
Updated settings file.
- Legacy-Id: 7358
1 parent 208b745 commit df97de8

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

ietf/settings.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -294,21 +294,13 @@ def skip_suspicious_operations(record):
294294
CACHE_MIDDLEWARE_KEY_PREFIX = ''
295295

296296
# The default with no CACHES setting is 'django.core.cache.backends.locmem.LocMemCache'
297-
if SERVER_MODE == 'production':
298-
299-
CACHES = {
300-
'default': {
301-
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
302-
'LOCATION': '127.0.0.1:11211',
303-
}
304-
}
305-
else:
306-
# Default to no caching in development/test
307-
CACHES = {
308-
'default': {
309-
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
310-
}
297+
# This setting is possibly overridden further down, after the import of settings_local
298+
CACHES = {
299+
'default': {
300+
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
301+
'LOCATION': '127.0.0.1:11211',
311302
}
303+
}
312304

313305
IPR_EMAIL_TO = ['ietf-ipr@ietf.org', ]
314306
DOC_APPROVAL_EMAIL_CC = ["RFC Editor <rfc-editor@rfc-editor.org>", ]
@@ -416,5 +408,11 @@ def skip_suspicious_operations(record):
416408
# absolutely vital that django fails to start in production mode unless a
417409
# secret key has been provided elsewhere, not in this file which is
418410
# publicly available, for instance from the source repository.
419-
if SERVER_MODE != 'production' and 'SECRET_KEY' not in locals():
420-
SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka'
411+
if SERVER_MODE != 'production':
412+
CACHES = {
413+
'default': {
414+
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
415+
}
416+
}
417+
if 'SECRET_KEY' not in locals():
418+
SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka'

0 commit comments

Comments
 (0)