导出excel用ajax不行,提交form表单可以. 一直用ajax找原因,网页不出现下载提示框 写了 response.setContentType("application/binary;charset=ISO8859_1");Date now = new Date();SimpleDateFormat toDoFormat = new SimpleDateFormat("yyyyMMddhhmmssSSS");String nowTime = toDoForm
优化 提交 form 表单,https://www.cnblogs.com/klvchen/p/10608143.html 创建数据库的字段,在 models.py 中添加 from django.db import models # Create your models here. class UserInfo(models.Model): username = models.CharField(max_length=64) sex = models.CharField(max_length=
后台: from django.shortcuts import render from django.shortcuts import redirect from django.shortcuts import HttpResponse from django import forms # 模版 class LoginForm(forms.Form): # 模版中的元素 user = forms.CharField(min_length=6,error_messages={"required&