def METHOD_NAME(request, slug=None):
    if not request.user.is_staff:
        raise Http404()
    schedule = fetch_schedule(slug)
    if request.method == "POST":
        form = ScheduleSectionForm(
            request.POST, request.FILES, schedule=schedule
        )
        if form.is_valid():
            if "submit" in form.data:
                msg = form.build_schedule()
            elif "delete" in form.data:
                msg = form.delete_schedule()
            messages.add_message(request, msg[0], msg[1])
    else:
        form = ScheduleSectionForm(schedule=schedule)
    days_qs = Day.objects.filter(schedule=schedule)
    days = [TimeTable(day) for day in days_qs]
    ctx = {"schedule": schedule, "days": days, "form": form}
    return render(request, "symposion/schedule/schedule_edit.html", ctx)