Skip to content
Snippets Groups Projects
Verified Commit 05b3d85a authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Redirect ot lessons list after deleting a substitution. Closes #32.

parent b70f4d1d
No related branches found
No related tags found
1 merge request!17Redirect ot lessons list after deleting a substitution. Closes #32.
......@@ -168,4 +168,5 @@ def delete_substitution(request: HttpRequest, id_: int, week: int) -> HttpRespon
week=week, lesson_period__id=id_
).delete()
return redirect('edit_substitution', id_, week)
messages.success(request, _('The substitution has been deleted.'))
return redirect('lessons_day_by_date', when=week_days(week)[lesson_period.period.weekday - 1].strftime('%Y-%m-%d'))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment