From 9b1f4e95e07f314fe76f2f85fe36571756f20f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sun, 17 Sep 2023 17:17:22 +0200 Subject: [PATCH] disable deleting sessions in code --- games/urls.py | 10 +++++----- games/views.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/games/urls.py b/games/urls.py index 08c8656..7113b4d 100644 --- a/games/urls.py +++ b/games/urls.py @@ -23,11 +23,11 @@ urlpatterns = [ views.start_session, name="start_session", ), - path( - "delete_session/by-id/", - views.delete_session, - name="delete_session", - ), + # path( + # "delete_session/by-id/", + # views.delete_session, + # name="delete_session", + # ), path("add-purchase/", views.add_purchase, name="add_purchase"), path("add-edition/", views.add_edition, name="add_edition"), path("edit-edition/", views.edit_edition, name="edit_edition"), diff --git a/games/views.py b/games/views.py index b5a22e7..ea362b8 100644 --- a/games/views.py +++ b/games/views.py @@ -128,10 +128,10 @@ def start_session(request, last_session_id: int): return redirect("list_sessions") -def delete_session(request, session_id=None): - session = Session.objects.get(id=session_id) - session.delete() - return redirect("list_sessions") +# def delete_session(request, session_id=None): +# session = Session.objects.get(id=session_id) +# session.delete() +# return redirect("list_sessions") def list_sessions(