From 9fb113d308092b3f2cc59b8d5cace7de13c46d3d Mon Sep 17 00:00:00 2001 From: lukaslondono77 Date: Sat, 31 May 2025 15:53:07 -0400 Subject: [PATCH 01/38] Apply all recent updates to Contact, About, URLs, and settings --- server/djangoproj/settings.py | 28 +++---- server/djangoproj/urls.py | 2 + server/frontend/static/About.html | 6 +- server/frontend/static/Contact.html | 114 ++++++++++++++++++++++++++++ 4 files changed, 135 insertions(+), 15 deletions(-) create mode 100644 server/frontend/static/Contact.html diff --git a/server/djangoproj/settings.py b/server/djangoproj/settings.py index e0b1092a5c..4f351ba0c9 100644 --- a/server/djangoproj/settings.py +++ b/server/djangoproj/settings.py @@ -13,23 +13,25 @@ import os from pathlib import Path - # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent - -# Quick-start development settings - unsuitable for production +# Quick‑start development settings – unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY =\ - 'django-insecure-ccow$tz_=9%dxu4(0%^(z%nx32#s@(zt9$ih@)5l54yny)wm-0' +SECRET_KEY = 'django-insecure-ccow$tz_=9%dxu4(0%^(z%nx32#s@(zt9$ih@)5l54yny)wm-0' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] -CSRF_TRUSTED_ORIGINS = [] +ALLOWED_HOSTS = [ + 'localhost', + 'lukaslondono-8000.theianext-1-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai' +] +CSRF_TRUSTED_ORIGINS = [ + 'https://lukaslondono-8000.theianext-1-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai' +] REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [], @@ -61,7 +63,9 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + os.path.join(BASE_DIR, 'frontend', 'static') + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -76,7 +80,6 @@ WSGI_APPLICATION = 'djangoproj.wsgi.application' - # Database # https://docs.djangoproject.com/en/3.2/ref/settings/#databases @@ -106,7 +109,6 @@ }, ] - # Internationalization # https://docs.djangoproject.com/en/3.2/topics/i18n/ @@ -120,7 +122,6 @@ USE_TZ = True - # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.2/howto/static-files/ @@ -134,5 +135,6 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -STATICFILES_DIRS = [] - +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, 'frontend', 'static') +] \ No newline at end of file diff --git a/server/djangoproj/urls.py b/server/djangoproj/urls.py index 6808da9141..5825f366ef 100644 --- a/server/djangoproj/urls.py +++ b/server/djangoproj/urls.py @@ -23,4 +23,6 @@ path('admin/', admin.site.urls), path('djangoapp/', include('djangoapp.urls')), path('', TemplateView.as_view(template_name="Home.html")), + path('about/', TemplateView.as_view(template_name="About.html")), + path('contact/', TemplateView.as_view(template_name="Contact.html")), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) diff --git a/server/frontend/static/About.html b/server/frontend/static/About.html index 484efd960f..63d4086103 100644 --- a/server/frontend/static/About.html +++ b/server/frontend/static/About.html @@ -1,6 +1,7 @@ - + +