From 7924e7e6ab009dea49ae1250d4c036a6797237d0 Mon Sep 17 00:00:00 2001 From: Mark MacWhinney Date: Tue, 22 Oct 2024 15:22:49 -0400 Subject: [PATCH] oct partwaychagese --- server/djangoapp/.env | 4 ++-- server/djangoapp/__init__.py | 0 server/djangoapp/restapis.py | 2 +- server/djangoapp/urls.py | 4 ++-- server/djangoproj/urls.py | 2 ++ server/frontend/src/App.js | 4 ++++ 6 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 server/djangoapp/__init__.py diff --git a/server/djangoapp/.env b/server/djangoapp/.env index 57749ed75d..8775c6e92a 100644 --- a/server/djangoapp/.env +++ b/server/djangoapp/.env @@ -1,2 +1,2 @@ -backend_url ="https://markmacw-3030.theiadockernext-0-labs-prod-theiak8s-4-tor01.proxy.cognitiveclass.ai/" -sentiment_analyzer_url="https://sentianalyzer.1na4xj0klzjm.us-south.codeengine.appdomain.cloud" +backend_url =https://markmacw-3030.theiadockernext-0-labs-prod-theiak8s-4-tor01.proxy.cognitiveclass.ai/ +sentiment_analyzer_url=https://sentianalyzer.1na4xj0klzjm.us-south.codeengine.appdomain.cloud diff --git a/server/djangoapp/__init__.py b/server/djangoapp/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/server/djangoapp/restapis.py b/server/djangoapp/restapis.py index 37f7b939d4..db864f4614 100644 --- a/server/djangoapp/restapis.py +++ b/server/djangoapp/restapis.py @@ -1,5 +1,5 @@ # Uncomment the imports below before you add the function code -# import requests +import requests import os from dotenv import load_dotenv diff --git a/server/djangoapp/urls.py b/server/djangoapp/urls.py index cad7a6530a..bb4151d417 100644 --- a/server/djangoapp/urls.py +++ b/server/djangoapp/urls.py @@ -16,10 +16,10 @@ path(route='login', view=views.login_user, name='login'), path(route='logout', view=views.logout_request, name='logout'), path(route='get_cars', view=views.get_cars, name='get_cars'), - path(route)='get_dealers', view=views.get_dealerships, name='get_deales'), + path(route='get_dealers/', view=views.get_dealerships, name='get_dealers'), path(route='get_dealers/', view=views.get_dealerships, name='get_dealers_by_state'), path(route='dealer/', view=views.get_dealer_details, name='dealer_details'), - path(route='reviews/dealer/', view=views.get_dealer_reviews, name='dealer_details'), + path(route='reviews/dealer/', view=views.get_dealer_reviews, name='get_dealer_reviews'), path(route='add_review', view=views.add_review, name='add_review'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/server/djangoproj/urls.py b/server/djangoproj/urls.py index 40ba5ee0dd..a6d5207975 100644 --- a/server/djangoproj/urls.py +++ b/server/djangoproj/urls.py @@ -28,5 +28,7 @@ path('login/', TemplateView.as_view(template_name="index.html")), path('logout/', TemplateView.as_view(template_name="index.html")), path('register/', TemplateView.as_view(template_name="index.html")), + path('dealers/', TemplateView.as_view(template_name="index.html")), + path('dealer/',TemplateView.as_view(template_name="index.html")), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) diff --git a/server/frontend/src/App.js b/server/frontend/src/App.js index 9de7ed4334..47d0414451 100644 --- a/server/frontend/src/App.js +++ b/server/frontend/src/App.js @@ -1,12 +1,16 @@ import LoginPanel from "./components/Login/Login"; import { Routes, Route } from "react-router-dom"; import RegisterPanel from "./components/Register/Register"; // Ensure the correct path +import Dealers from './components/Dealers/Dealers'; +import Dealer from "./components/Dealers/Dealer" function App() { return ( } /> } /> + } /> + } /> ); }