本文整理汇总了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})