摘要: 异同 当我们在form组件用clean函数(无论是局部或者全局钩子函数)验证字段是否有错误时,如果字段正确则最终clean函数要返回该字段值(全局钩子返回self.cleaned_data),是为了放入form对象的cleaned_data字典中,以供后续使用。 出现错误则有两种选择 raise V 阅读全文
posted @ 2020-11-05 00:14 lymmurrain 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 前置知识 ajax形式post提交数据的content-type有主要常用三种 application/x-www-form-urlencoded multipart/form-data(上传文件) application/json 原生的django对于content-type为applicati 阅读全文
posted @ 2020-11-05 00:08 lymmurrain 阅读(1850) 评论(0) 推荐(0) 编辑