コード例 #1
0
def create_transcode(request, video_id):
    video = get_object_or_404(get_video_model(), id=video_id)
    transcode_form = VideoTranscodeAdminForm(data=request.POST, video=video)

    if transcode_form.is_valid():
        transcode_form.save()
    return redirect('wagtailvideos:edit', video_id)
コード例 #2
0
def create_transcode(request, video_id):
    if request.method != 'POST':
        return HttpResponseNotAllowed(['POST'])
    video = get_object_or_404(Video, id=video_id)
    transcode_form = VideoTranscodeAdminForm(data=request.POST, video=video)

    if transcode_form.is_valid():
        transcode_form.save()
    return redirect('wagtailvideos:edit', video_id)