def show_durations(request): if request.method == 'POST': compositions, args = filter_compositions(request) args.update(durations.analysis(compositions)) return render(request, 'durations_result.html', args) args = make_filter_args() return render(request, 'durations.html', args)
def composition_durations(request, code): composition = Composition.objects.get(music_data__score__code=code) args = durations.analysis([composition]) args.update({'composition_code': code}) return render(request, 'durations_result.html', args)