Re-enable delete session delete view
This commit is contained in:
parent
880ea93424
commit
15997bd5af
|
@ -42,11 +42,11 @@ urlpatterns = [
|
||||||
{"template": "list_sessions.html#session-row"},
|
{"template": "list_sessions.html#session-row"},
|
||||||
name="list_sessions_end_session",
|
name="list_sessions_end_session",
|
||||||
),
|
),
|
||||||
# path(
|
path(
|
||||||
# "session/<int:session_id>/delete",
|
"session/<int:session_id>/delete",
|
||||||
# views.delete_session,
|
views.delete_session,
|
||||||
# name="delete_session",
|
name="delete_session",
|
||||||
# ),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase/<int:purchase_id>/delete",
|
"purchase/<int:purchase_id>/delete",
|
||||||
views.delete_purchase,
|
views.delete_purchase,
|
||||||
|
|
|
@ -283,11 +283,11 @@ def end_session(request, session_id: int, template: str = ""):
|
||||||
return render(request, template, context)
|
return render(request, template, context)
|
||||||
return redirect("list_sessions")
|
return redirect("list_sessions")
|
||||||
|
|
||||||
|
@login_required
|
||||||
# def delete_session(request, session_id=None):
|
def delete_session(request, session_id=None):
|
||||||
# session = Session.objects.get(id=session_id)
|
session = get_object_or_404(Session, id=session_id)
|
||||||
# session.delete()
|
session.delete()
|
||||||
# return redirect("list_sessions")
|
return redirect("list_sessions")
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
|
Loading…
Reference in New Issue