一.form表单上传文件 注意: 1.form上需要加enctype="multipart/form-data" 2.form提交的地址需要以/结尾 def form_file(request): if request.method=="POST": file = request.FILES.get("file") with open(file.name,"wb") as f: for chunk in file.chunks
一.Form文件上传 """ Django settings for prev_chouti project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settin