aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2021-11-11 15:00:24 -0600
committerKelley Spoon <kelley.spoon@linaro.org>2021-11-18 20:58:57 +0000
commit73dbed9ddbec37226fdf97e594107a0710c25c0f (patch)
treeb60a89a3a32c6e3bde0ed59fc2ef1d1f00a53964
parenta779fbdd6371569c6d8211a9b8c091f56d8fea1d (diff)
downloadlinaro-license-protection-73dbed9ddbec37226fdf97e594107a0710c25c0f.tar.gz
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 <kelley.spoon@linaro.org>
-rw-r--r--settings.py6
1 files changed, 5 insertions, 1 deletions
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