本文整理匯總了Python中Tools.Tools.deleteGivenFiles方法的典型用法代碼示例。如果您正苦於以下問題:Python Tools.deleteGivenFiles方法的具體用法?Python Tools.deleteGivenFiles怎麽用?Python Tools.deleteGivenFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tools.Tools
的用法示例。
在下文中一共展示了Tools.deleteGivenFiles方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: main
# 需要導入模塊: from Tools import Tools [as 別名]
# 或者: from Tools.Tools import deleteGivenFiles [as 別名]
def main(request):
if request.method == "POST":
form = DeleteForm(post=request.POST,user=request.session['user'])
Tools.deleteGivenFiles(form.data,request) #Deleting files from data in form.data and finding in which folder from session in request
return render(request,'base.html',{'message_m':'Files deleted'})
else:
formD = DeleteForm()
formR = RenameForm()
formR.addForm(request.session['user'])
formD.addForm(request.session['user'])
linki = prepareLinks(request.session['user'],formD) #creates links to download for each file
from collections import OrderedDict
parameters = OrderedDict()
parameters['formD'] = formD
parameters['formR'] = formR
parameters['links'] = linki
display = Tools.Display(parameters)
return render(request,"main.html",{'D':display})