@@ -1070,6 +1070,8 @@ def skip_unreadable_post(record):
10701070DEV_PRE_APPS = [] # type: List[str]
10711071DEV_MIDDLEWARE = ()
10721072
1073+ PROD_PRE_APPS = [] # type: List[str]
1074+
10731075# django-debug-toolbar and the debug listing of sql queries at the bottom of
10741076# each page when in dev mode can overlap in functionality, and can slow down
10751077# page loading. If you wish to use the sql_queries debug listing, put this in
@@ -1209,14 +1211,15 @@ def skip_unreadable_post(record):
12091211 if os .path .exists (app_settings_file ):
12101212 exec ("from %s import *" % (app + ".settings" ))
12111213
1212- # Add DEV_APPS to INSTALLED_APPS
1213- INSTALLED_APPS += DEV_APPS
1214- INSTALLED_APPS = DEV_PRE_APPS + INSTALLED_APPS
1215- MIDDLEWARE += DEV_MIDDLEWARE
1216- TEMPLATES [0 ]['OPTIONS' ]['context_processors' ] += DEV_TEMPLATE_CONTEXT_PROCESSORS
1217-
1214+ # Add APPS from settings_local to INSTALLED_APPS
12181215if SERVER_MODE == 'production' :
1219- INSTALLED_APPS .insert (0 ,'scout_apm.django' )
1216+ INSTALLED_APPS = PROD_PRE_APPS + INSTALLED_APPS
1217+ else :
1218+ INSTALLED_APPS += DEV_APPS
1219+ INSTALLED_APPS = DEV_PRE_APPS + INSTALLED_APPS
1220+ MIDDLEWARE += DEV_MIDDLEWARE
1221+ TEMPLATES [0 ]['OPTIONS' ]['context_processors' ] += DEV_TEMPLATE_CONTEXT_PROCESSORS
1222+
12201223
12211224# We provide a secret key only for test and development modes. It's
12221225# absolutely vital that django fails to start in production mode unless a
0 commit comments