def METHOD_NAME(self, request, *args, **kwargs):
    approved = ast.literal_eval(
        request.POST.get('approved', 'False')
    )
    next_url = request.POST.get('next', '/')
    if approved:
        approved_id = request.POST.get('approved_id')
        if not approved_id:
            raise Http404('Missing approved id!')
        try:
            download_request = DownloadRequest.objects.get(
                id=int(approved_id)
            )
            download_request.processing = True
            download_request.approved = True
            download_request.rejected = False
            download_request.save()
        except DownloadRequest.DoesNotExist:
            raise Http404('The request does not exist!')
    else:
        rejected_id = request.POST.get('rejected_id')
        rejection_message = request.POST.get('rejection_message', '')
        if not rejected_id:
            raise Http404('Missing rejected id!')
        try:
            download_request = DownloadRequest.objects.get(
                id=int(rejected_id)
            )
            download_request.processing = False
            download_request.approved = False
            download_request.rejected = True
            download_request.rejection_message = rejection_message
            download_request.save()
        except DownloadRequest.DoesNotExist:
            raise Http404('The request does not exist!')
    return HttpResponseRedirect(next_url)