From fc2673c13cce78edc188669f41b1cf15e4fd0024 Mon Sep 17 00:00:00 2001
From: Robert Sparks <rjsparks@nostrum.com>
Date: Thu, 18 Jan 2024 16:51:09 -0600
Subject: [PATCH 1/2] refactor: use statics.ietf.org for all statics

---
 ietf/checks.py   | 20 --------------------
 ietf/settings.py |  4 ++--
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/ietf/checks.py b/ietf/checks.py
index c823abf11..f9ad87db7 100644
--- a/ietf/checks.py
+++ b/ietf/checks.py
@@ -28,26 +28,6 @@ def already_ran():
         checks_run.append(name)
         return False
 
-@checks.register('directories')
-def check_cdn_directory_exists(app_configs, **kwargs):
-    """This checks that the path from which the CDN will serve static files for
-       this version of the datatracker actually exists.  In development and test
-       mode STATIC_ROOT will normally be just static/, but in production it will be
-       set to a different part of the file system which is served via CDN, and the
-       path will contain the datatracker release version.
-    """
-    if already_ran():
-        return []
-    #
-    errors = []
-    if settings.SERVER_MODE == 'production' and not os.path.exists(settings.STATIC_ROOT):
-        errors.append(checks.Error(
-            "The static files directory has not been set up.",
-            hint="Please run 'ietf/manage.py collectstatic'.",
-            obj=None,
-            id='datatracker.E001',
-        ))
-    return errors
 
 @checks.register('files')
 def check_group_email_aliases_exists(app_configs, **kwargs):
diff --git a/ietf/settings.py b/ietf/settings.py
index eb5066e97..23715884b 100644
--- a/ietf/settings.py
+++ b/ietf/settings.py
@@ -169,8 +169,8 @@ if SERVER_MODE != 'production' and SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE:
     STATIC_URL = "/static/"
     STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/")
 else:
-    STATIC_URL = "https://www.ietf.org/lib/dt/%s/"%__version__
-    STATIC_ROOT = "/a/www/www6s/lib/dt/%s/"%__version__
+    STATIC_URL = "https://static.ietf.org/lib/%s/"%__version__
+    STATIC_ROOT = None
 
 # List of finder classes that know how to find static files in
 # various locations.

From b38e8c38aeb352263a9b8893018e5c1d203010ed Mon Sep 17 00:00:00 2001
From: Robert Sparks <rjsparks@nostrum.com>
Date: Fri, 19 Jan 2024 14:21:09 -0600
Subject: [PATCH 2/2] chore: shadowbox with mypy

---
 ietf/settings.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ietf/settings.py b/ietf/settings.py
index 23715884b..758f0ca2b 100644
--- a/ietf/settings.py
+++ b/ietf/settings.py
@@ -170,7 +170,7 @@ if SERVER_MODE != 'production' and SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE:
     STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/")
 else:
     STATIC_URL = "https://static.ietf.org/lib/%s/"%__version__
-    STATIC_ROOT = None
+    # Intentionally not setting STATIC_ROOT - see django/django (the default is None)
 
 # List of finder classes that know how to find static files in
 # various locations.