From a8aab5cb177c4014e9a65ac225be5f1439b21407 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 7 Oct 2021 16:39:29 +0000 Subject: [PATCH] Added scout-apm to the requirements and added settings scaffolding. - Legacy-Id: 19399 --- changelog | 2 ++ ietf/settings.py | 6 +++++- requirements.txt | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index bde3742b4..d2836d500 100644 --- a/changelog +++ b/changelog @@ -26,6 +26,8 @@ ietfdb (7.39.0) ietf; urgency=medium * Merged in [19396] from rjsparks@nostrum.com: Provide a metadata endpoint to assist rfcdiff.pyht. + * Added scout-apm to requirements and added settings scaffolding. + -- Robert Sparks 07 Oct 2021 15:20:42 +0000 diff --git a/ietf/settings.py b/ietf/settings.py index 126508e6b..f9b4afe0a 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -1051,6 +1051,7 @@ BADNESS_MUCHTOOBIG = 500 # Set debug apps in settings_local.DEV_APPS DEV_APPS = [] # type: List[str] +DEV_PRE_APPS = [] DEV_MIDDLEWARE = () # django-debug-toolbar and the debug listing of sql queries at the bottom of @@ -1226,9 +1227,12 @@ for app in INSTALLED_APPS: # 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 +if SERVER_MODE == 'production': + INSTALLED_APPS.insert(0,'scout_apm.django') # 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 @@ -1288,4 +1292,4 @@ if SERVER_MODE != 'production': CSRF_COOKIE_SAMESITE = 'Lax' SESSION_COOKIE_SECURE = False SESSION_COOKIE_SAMESITE = 'Lax' - \ No newline at end of file + diff --git a/requirements.txt b/requirements.txt index 75bc81f9e..177472edd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -60,6 +60,7 @@ pytz>=2014.7 requests!=2.12.* requests-mock>=1.8 rfc2html>=2.0.1 +scout-apm>=2.23.0 selenium>=3.9.0 six>=1.10.0 svn>=1.0.1