def rm_stored_dir(dir_path, storage=default_storage):
 empty_dirs = []
 for (root, dirs, files) in walk_storage(dir_path):
  for fn in files:
   storage.delete(('%s/%s' % (root, fn)))
  empty_dirs.insert(0, root)
 empty_dirs.append(dir_path)
 for dn in empty_dirs:
  storage.delete(dn)

def rm_stored_dir ( dir_path , storage = default_storage ) : empty_dirs = [ ] for ( root , dirs , files ) in walk_storage ( dir_path ) : for fn in files : storage . delete ( ( '%s/%s' % ( root , fn ) ) ) empty_dirs . insert ( 0 , root ) empty_dirs . append ( dir_path ) for dn in empty_dirs : storage . delete ( dn )
removes a stored directory and all files stored beneath that path .