Skip to content

Commit

Permalink
refactor: use statics.ietf.org for all statics
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks committed Jan 18, 2024
1 parent 0ba7eaf commit fc2673c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
20 changes: 0 additions & 20 deletions ietf/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions ietf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@
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.
Expand Down

0 comments on commit fc2673c

Please sign in to comment.