disable deleting sessions in code
This commit is contained in:
parent
d1f843a267
commit
9b1f4e95e0
|
@ -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"),
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue