From 46d785805653fa2b51c31493888a1a716eeb73d8 Mon Sep 17 00:00:00 2001 From: Allen <63997543+aaw3@users.noreply.github.com> Date: Sun, 24 Sep 2023 12:09:42 -0500 Subject: [PATCH] Made FAQ dynamic, added marketdata --- .../seatstock_django/seatstock_django/urls.py | 4 ++- .../seatstock_django/views.py | 29 ++++++++++++++++++- frontend/{static => templates}/FAQ.html | 22 +++++++------- frontend/templates/buy.html | 6 ++-- frontend/templates/index.html | 6 ++-- frontend/templates/sell.html | 4 +-- frontend/templates/tickets.html | 6 ++-- 7 files changed, 53 insertions(+), 24 deletions(-) rename frontend/{static => templates}/FAQ.html (91%) diff --git a/backend/django/seatstock_django/seatstock_django/urls.py b/backend/django/seatstock_django/seatstock_django/urls.py index 05a1f6f..9122d05 100644 --- a/backend/django/seatstock_django/seatstock_django/urls.py +++ b/backend/django/seatstock_django/seatstock_django/urls.py @@ -26,5 +26,7 @@ urlpatterns = [ path("login", views.login, name="login"), path("logout", views.logout, name="logout"), path("callback", views.callback, name="callback"), - + path("tickets", views.tickets, name="tickets"), + path("market", views.marketdata, name="marketdata"), + path("FAQ", views.FAQ, name="FAQ") ] diff --git a/backend/django/seatstock_django/seatstock_django/views.py b/backend/django/seatstock_django/seatstock_django/views.py index f48cf77..b3362fd 100644 --- a/backend/django/seatstock_django/seatstock_django/views.py +++ b/backend/django/seatstock_django/seatstock_django/views.py @@ -47,6 +47,33 @@ def index(request): "index.html", context={ "session": request.session.get("user"), - "pretty": json.dumps(request.session.get("user"), indent=4), + #"pretty": json.dumps(request.session.get("user"), indent=4), }, ) + +def tickets(request): + return render( + request, + "tickets.html", + context={ + "session": request.session.get("user"), + } + ) + +def marketdata(request): + return render( + request, + "marketdata.html", + context={ + "session": request.session.get("user"), + } + ) + +def FAQ(request): + return render( + request, + "FAQ.html", + context={ + "session": request.session.get("user"), + } + ) \ No newline at end of file diff --git a/frontend/static/FAQ.html b/frontend/templates/FAQ.html similarity index 91% rename from frontend/static/FAQ.html rename to frontend/templates/FAQ.html index ed61769..caf2ee0 100644 --- a/frontend/static/FAQ.html +++ b/frontend/templates/FAQ.html @@ -4,8 +4,8 @@