From d7c60292ae4209e254dd4985ded17a97f0f9f563 Mon Sep 17 00:00:00 2001 From: Avaneeshakrishna Date: Mon, 4 Nov 2024 10:35:56 -0500 Subject: [PATCH 01/11] Add new static files and update project settings and URLs --- server/djangoproj/settings.py | 11 ++- server/djangoproj/urls.py | 2 + server/frontend/static/About.html | 40 ++++++---- server/frontend/static/Contact.html | 102 +++++++++++++++++++++++++ server/frontend/static/contact_img.jpg | Bin 0 -> 82779 bytes server/frontend/static/person1.jpg | Bin 0 -> 1902014 bytes server/frontend/static/person2.jpg | Bin 0 -> 335656 bytes server/frontend/static/person3.jpg | Bin 0 -> 2072572 bytes 8 files changed, 137 insertions(+), 18 deletions(-) create mode 100644 server/frontend/static/Contact.html create mode 100644 server/frontend/static/contact_img.jpg create mode 100644 server/frontend/static/person1.jpg create mode 100644 server/frontend/static/person2.jpg create mode 100644 server/frontend/static/person3.jpg diff --git a/server/djangoproj/settings.py b/server/djangoproj/settings.py index e0b1092a5cc..fa2da8f28e7 100644 --- a/server/djangoproj/settings.py +++ b/server/djangoproj/settings.py @@ -28,7 +28,8 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS=['localhost','https://avaneeshshas-8000.theianext-1-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai'] +CSRF_TRUSTED_ORIGINS=['https://avaneeshshas-8000.theianext-1-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai'] CSRF_TRUSTED_ORIGINS = [] REST_FRAMEWORK = { @@ -61,7 +62,9 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + os.path.join(BASE_DIR,'frontend/static') + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -134,5 +137,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -STATICFILES_DIRS = [] +STATICFILES_DIRS = [ + os.path.join(BASE_DIR,'frontend/static') +] diff --git a/server/djangoproj/urls.py b/server/djangoproj/urls.py index 6808da91414..db88bf9b935 100644 --- a/server/djangoproj/urls.py +++ b/server/djangoproj/urls.py @@ -22,5 +22,7 @@ urlpatterns = [ path('admin/', admin.site.urls), path('djangoapp/', include('djangoapp.urls')), + path('about/', TemplateView.as_view(template_name="About.html")), + path('contact/', TemplateView.as_view(template_name="Contact.html")), path('', TemplateView.as_view(template_name="Home.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 484efd960fe..478342ce7ee 100644 --- a/server/frontend/static/About.html +++ b/server/frontend/static/About.html @@ -1,6 +1,8 @@ + +