From 73dbed9ddbec37226fdf97e594107a0710c25c0f Mon Sep 17 00:00:00 2001 From: Kelley Spoon Date: Thu, 11 Nov 2021 15:00:24 -0600 Subject: settings.py: add beautifulsoup warning suppression and fix static dir This change adds in code to supress the beautifulsoup warning from the application log in addition to the previous commit that removes it from the user space commands. Also, the STATICFILES_DIRS is incorrectly set to be the same as STATIC_ROOT. Instead let's point it at PROJECT_ROOT to make sure the right files get picked up and we avoid any nasty loops when running collectstatic Change-Id: I5a2c592cfd3c625053e785c62863e6f6ff0af59f Reviewed-on: https://review.linaro.org/c/infrastructure/linaro-license-protection/+/40044 Reviewed-by: Kelley Spoon --- settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/settings.py b/settings.py index 005c5c8..cb2fd19 100644 --- a/settings.py +++ b/settings.py @@ -1,5 +1,9 @@ # Django settings for linaro_license_protection_2 project. +# suppress BeautifulSoup warning +import warnings +warnings.filterwarnings("ignore", category=UserWarning) + import os from version import VERSION @@ -83,7 +87,7 @@ STATICFILES_DIRS = ( # Also: # - for some reason, django doesn't like this to be "STATIC_ROOT" # - this must be a tuple, so even if only 1 entry leave a trailing comma - os.path.join(PROJECT_ROOT, 'license_protected_downloads/static'), + os.path.join(PROJECT_ROOT, 'static'), ) # List of finder classes that know how to find static files in -- cgit v1.2.3