From b2c132c49270f2c33a9c863fdd8f0dd620a897b6 Mon Sep 17 00:00:00 2001 From: madhubala Date: Tue, 13 May 2025 19:32:04 -0400 Subject: [PATCH 01/23] Adding temporary changes to Github --- server/djangoproj/settings.py | 15 +++-- server/djangoproj/urls.py | 6 ++ server/frontend/static/About.html | 40 ++++++------ server/frontend/static/contact.html | 94 +++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 23 deletions(-) create mode 100644 server/frontend/static/contact.html diff --git a/server/djangoproj/settings.py b/server/djangoproj/settings.py index e0b1092a5c..17510d99cb 100644 --- a/server/djangoproj/settings.py +++ b/server/djangoproj/settings.py @@ -28,8 +28,11 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] -CSRF_TRUSTED_ORIGINS = [] +ALLOWED_HOSTS = [ + 'localhost', + 'madhubalasel-8000.theianext-1-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai' +] +CSRF_TRUSTED_ORIGINS = ['https://madhubalasel-8000.theianext-1-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai'] REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [], @@ -61,7 +64,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 +139,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 6808da9141..7f35189421 100644 --- a/server/djangoproj/urls.py +++ b/server/djangoproj/urls.py @@ -18,9 +18,15 @@ from django.views.generic import TemplateView from django.conf.urls.static import static from django.conf import settings +from django.http import HttpResponse +import os +from django.conf import settings urlpatterns = [ 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")), + path('contact/', lambda request: HttpResponse(open('frontend/static/contact.html').read(), content_type='text/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..051b25f1dc 100644 --- a/server/frontend/static/About.html +++ b/server/frontend/static/About.html @@ -1,11 +1,12 @@ - + +
-