Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions ietf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,8 @@ def skip_unreadable_post(record):
DEV_PRE_APPS = [] # type: List[str]
DEV_MIDDLEWARE = ()

PROD_PRE_APPS = [] # type: List[str]

# django-debug-toolbar and the debug listing of sql queries at the bottom of
# each page when in dev mode can overlap in functionality, and can slow down
# page loading. If you wish to use the sql_queries debug listing, put this in
Expand Down Expand Up @@ -1209,14 +1211,15 @@ def skip_unreadable_post(record):
if os.path.exists(app_settings_file):
exec("from %s import *" % (app+".settings"))

# Add DEV_APPS to INSTALLED_APPS
INSTALLED_APPS += DEV_APPS
INSTALLED_APPS = DEV_PRE_APPS + INSTALLED_APPS
MIDDLEWARE += DEV_MIDDLEWARE
TEMPLATES[0]['OPTIONS']['context_processors'] += DEV_TEMPLATE_CONTEXT_PROCESSORS

# Add APPS from settings_local to INSTALLED_APPS
if SERVER_MODE == 'production':
INSTALLED_APPS.insert(0,'scout_apm.django')
INSTALLED_APPS = PROD_PRE_APPS + INSTALLED_APPS
else:
INSTALLED_APPS += DEV_APPS
INSTALLED_APPS = DEV_PRE_APPS + INSTALLED_APPS
MIDDLEWARE += DEV_MIDDLEWARE
TEMPLATES[0]['OPTIONS']['context_processors'] += DEV_TEMPLATE_CONTEXT_PROCESSORS


# We provide a secret key only for test and development modes. It's
# absolutely vital that django fails to start in production mode unless a
Expand Down