From 86ec8c5684c4294bc2b0ef21bc5bcf5dfdecea7c Mon Sep 17 00:00:00 2001 From: tsb Date: Wed, 18 Dec 2024 11:36:47 -1000 Subject: [PATCH] Update settings to have proper allowed hosts --- baby_tracker/settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/baby_tracker/settings.py b/baby_tracker/settings.py index 18e8edd..278609e 100644 --- a/baby_tracker/settings.py +++ b/baby_tracker/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/5.1/ref/settings/ """ from pathlib import Path +import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -25,7 +26,7 @@ SECRET_KEY = 'django-insecure-q_$lvms3r!+meum_0o&b^#vkf75+sy!kax9v^pyr@fipj6&2$a # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['localhost', '.taylorberukoff.dev', 'babytracker.taylorberukoff.dev', '72.235.32.92' ] # Application definition @@ -117,6 +118,7 @@ USE_TZ = True # https://docs.djangoproject.com/en/5.1/howto/static-files/ STATIC_URL = 'static/' +STATIC_ROOT = os.path.join(BASE_DIR, 'static/') # Default primary key field type # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field