disable deleting sessions in code

This commit is contained in:
Lukáš Kucharczyk 2023-09-17 17:17:22 +02:00
parent d1f843a267
commit 9b1f4e95e0
2 changed files with 9 additions and 9 deletions

View File

@ -23,11 +23,11 @@ urlpatterns = [
views.start_session,
name="start_session",
),
path(
"delete_session/by-id/<int:session_id>",
views.delete_session,
name="delete_session",
),
# path(
# "delete_session/by-id/<int:session_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/<int:edition_id>", views.edit_edition, name="edit_edition"),

View File

@ -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(