Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)