From f6ff3ff266d8a080454c5f2b1a87ce2a67f203fe Mon Sep 17 00:00:00 2001 From: Allen <63997543+aaw3@users.noreply.github.com> Date: Sun, 24 Sep 2023 12:44:52 -0500 Subject: [PATCH] Added buy/sell to django --- .../seatstock_django/seatstock_django/urls.py | 4 +++- .../seatstock_django/seatstock_django/views.py | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/backend/django/seatstock_django/seatstock_django/urls.py b/backend/django/seatstock_django/seatstock_django/urls.py index 66880ff..5796d5e 100644 --- a/backend/django/seatstock_django/seatstock_django/urls.py +++ b/backend/django/seatstock_django/seatstock_django/urls.py @@ -29,5 +29,7 @@ urlpatterns = [ path("tickets", views.tickets, name="tickets"), path("market", views.marketdata, name="marketdata"), path("FAQ", views.FAQ, name="FAQ"), - path("account_session_data", views.account_session_data, name="account_session_data") + path("account_session_data", views.account_session_data, name="account_session_data"), + path("buy", views.buy, name="buy"), + path("sell", views.sell, name="sell") ] diff --git a/backend/django/seatstock_django/seatstock_django/views.py b/backend/django/seatstock_django/seatstock_django/views.py index 15f4cff..48dbcc0 100644 --- a/backend/django/seatstock_django/seatstock_django/views.py +++ b/backend/django/seatstock_django/seatstock_django/views.py @@ -86,4 +86,22 @@ def account_session_data(request): "session": request.session.get("user"), "pretty": json.dumps(request.session.get("user"), indent=4), }, + ) + +def buy(request): + return render( + request, + "buy.html", + context={ + "session": request.session.get("user"), + }, + ) + +def sell(request): + return render( + request, + "sell.html", + context={ + "session": request.session.get("user"), + }, ) \ No newline at end of file