From a1dc13b28fbbef7c50807b310681ea51a8640834 Mon Sep 17 00:00:00 2001 From: Jitendra Date: Mon, 17 Mar 2025 00:20:52 +0530 Subject: [PATCH 1/8] intial --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5884e26a5b..87b540caef 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -# coding-project-template \ No newline at end of file +# coding-project-template +#Coding start now 03/17/2025 \ No newline at end of file From 0e8460fc4f2d6b6737adf901a8252371668c8501 Mon Sep 17 00:00:00 2001 From: Jitendra Date: Mon, 17 Mar 2025 01:44:07 +0530 Subject: [PATCH 2/8] model --- server/djangoproj/settings.py | 14 ++- server/djangoproj/urls.py | 2 + server/frontend/static/About.html | 32 ++++--- server/frontend/static/Contact.html | 90 ++++++++++++++++++ .../static/happy-person-png-23617.png | Bin 0 -> 8974659 bytes .../static/happy-person-png-23636.png | Bin 0 -> 433470 bytes server/frontend/static/person.png | Bin 138137 -> 13776 bytes 7 files changed, 120 insertions(+), 18 deletions(-) create mode 100644 server/frontend/static/Contact.html create mode 100644 server/frontend/static/happy-person-png-23617.png create mode 100644 server/frontend/static/happy-person-png-23636.png diff --git a/server/djangoproj/settings.py b/server/djangoproj/settings.py index e0b1092a5c..bd42160b61 100644 --- a/server/djangoproj/settings.py +++ b/server/djangoproj/settings.py @@ -28,8 +28,8 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] -CSRF_TRUSTED_ORIGINS = [] +ALLOWED_HOSTS = ['localhost','http://127.0.0.1:8000/',"http://127.0.0.1",'127.0.0.1'] +CSRF_TRUSTED_ORIGINS = ['http://127.0.0.1:8000/'] REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [], @@ -61,7 +61,9 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + os.path.join(BASE_DIR,'frontend/static') + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -74,6 +76,8 @@ }, ] + + WSGI_APPLICATION = 'djangoproj.wsgi.application' @@ -134,5 +138,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..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..b94dd095a7 100644 --- a/server/frontend/static/About.html +++ b/server/frontend/static/About.html @@ -1,6 +1,8 @@ + +