Exemplo n.º 1
0
def clone_bucket_to_folder(request):
    if request.method=='POST':
        folder = Folder.objects.get( id=request.POST.get('folder_id') )
        bucket = Bucket.objects.get( id=request.POST.get('bucket_id') )
        tools.move_files_from_bucket_to_folder(bucket, folder)
        tools.empty_bucket(bucket)
    return HttpResponseRedirect( request.POST.get('redirect_to', '') )
Exemplo n.º 2
0
def empty_bucket(request):
    if request.method=='POST':
        bucket = Bucket.objects.get( id=request.POST.get('bucket_id') )
        tools.empty_bucket(bucket)
    return HttpResponseRedirect( request.POST.get('redirect_to', '') )