文件上传(三式) 1.urls.py文件 url(r'^upload.html$', views.upload), 2.views.py文件 import os def upload(request): if request.method == 'GET': #获取所有img img_list = models.Img.objects.all() return render(request,'upload.html',{'img_list': img_list}) elif request.me…