作者:幻月九十链接:https://www.zhihu.com/question/19631256/answer/119911045来源:知乎著作权归作者所有,转载请联系作者获得授权. $('form').submit(function (event) { event.preventDefault(); var form = $(this); if (!form.hasClass('fupload')) { //普通表单 $.ajax({ type: form.attr('method'), u
服务器端视图函数 from django.shortcuts import render,HttpResponse from django.views.decorators.csrf import csrf_exempt # Create your views here. @csrf_exempt#这个可以对csrf进行放行 def up(request,): file_list = request.FILES.getlist('save_data') for i in file_list: f
1:python之上传文件 1.1.url代码 """untitled1222 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from