Redirect to previous page after editing a session
This commit is contained in:
parent
31daf2efe0
commit
abdcfdfe64
@ -26,7 +26,6 @@ from common.time import (
|
|||||||
from common.utils import truncate
|
from common.utils import truncate
|
||||||
from games.forms import SessionForm
|
from games.forms import SessionForm
|
||||||
from games.models import Game, Session
|
from games.models import Game, Session
|
||||||
from games.views.general import use_custom_redirect
|
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@ -215,7 +214,6 @@ def add_session(request: HttpRequest, game_id: int = 0) -> HttpResponse:
|
|||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@use_custom_redirect
|
|
||||||
def edit_session(request: HttpRequest, session_id: int) -> HttpResponse:
|
def edit_session(request: HttpRequest, session_id: int) -> HttpResponse:
|
||||||
context = {}
|
context = {}
|
||||||
session = get_object_or_404(Session, id=session_id)
|
session = get_object_or_404(Session, id=session_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user