'ContactForm' object has no attribute 'cleaned_data'
在学习The django book 的时候,出现了下面的错误
'ContactForm' object has no attribute 'cleaned_data'
但是实际上这个方法是存在的,后来检查代码发现下面标红的括号给遗漏掉了,就出现这个问题,后来加上就好了,
if form.is_valid[color=red]()[/color]:
cd = form.cleaned_data
疑问点在于:难道每次调用cleaned_data都得先调用is_valid()方法吗?
'ContactForm' object has no attribute 'cleaned_data'相关推荐
- Python错误:AttributeError: 'generator' object has no attribute 'next'解决办法
今天在学习生成器对象(generation object)运行以下代码时,遇到了一个错误: #定义生成器函数 def liebiao(): for x in range(10): yield x #函 ...
- AttributeError: 'dict' object has no attribute 'status_code'
前端AJAX请求数据,提示错误:"AttributeError: 'dict' object has no attribute 'status_code'". 原因:是提示返回对象 ...
- Traceback (most recent call last): File AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):File "<stdin>", line 1, in <module> Attribut ...
- 解决:AttributeError: ‘Graph‘ object has no attribute ‘number_of_selfloops‘
解决:AttributeError: 'Graph' object has no attribute 'number_of_selfloops' 目录 解决:AttributeError: 'Grap ...
- AttributeError: ‘FPDF‘ object has no attribute ‘unifontsubset‘
AttributeError: 'FPDF' object has no attribute 'unifontsubset' 目录 AttributeError: 'FPDF' object has ...
- AttributeError: ‘Series‘ object has no attribute ‘as_matrix‘
AttributeError: 'Series' object has no attribute 'as_matrix' 问题: y_test = test_shifted["y_t+1&q ...
- AttributeError: ‘SVC‘ object has no attribute ‘_probA‘
AttributeError: 'SVC' object has no attribute '_probA' 问题: # Save the Modle to file in the current w ...
- sklearn使用FeatureHasher处理字符串特征: AttributeError: ‘str‘ object has no attribute ‘items‘
sklearn使用FeatureHasher处理字符串特征: AttributeError: 'str' object has no attribute 'items' 目录 sklearn使用Fea ...
- Keras问题“AttributeError: 'NoneType' object has no attribute 'update”解决
BUG 在使用Keras训练模型时,在每个epoch完成后save_model时会报错 "AttributeError: 'NoneType' object has no attribute ...
最新文章
- 基于javaGUI的文档识别工具制作
- 基于OpenLayers+rbush实现高德轨迹样式
- 137.三网?哪三网?139.网络协议三要素?141.网络安全有哪些方面?
- Qt中的自定义模型类
- 关于重复接收NSNotificationCenter发送的通知的问题
- Spark笔记:复杂RDD的API的理解(下)
- mysql抑音符_MySQL-数据类型
- React学习初探(环境搭建)
- java用for打印正方形_java.java
- 伺服驱动器cn1引脚定义_台达A2 A3系列伺服CN1接线对照表
- 以太网卡 及 以太网帧
- IEEE Conference Template Letter
- 关于ios13升级到ios14企业APP出现无法安装解决方案
- 史上官场吃喝风:与送礼一样成为通用的规则
- void* to ULONG
- C++11 ThreadPool总结
- 起点web端体验报告
- 【Java】练习题库 单选题
- ninja文件语法学习
- 浅谈边缘计算下的车联网
热门文章
- 改Android app字体,Android 开发之修改 app 的字体大小
- AutoCAD2016简体中文破解版32位64位下载
- 穷人思维」过渡到「富人思维」
- turnserver 搭建
- 线性光耦(PC817)工作的分析
- android之银联支付,android端银联支付
- 第三届全国中医药院校大学生程序设计竞赛 (正式赛)
- 持续集成与持续部署(五)01-TravisCI——使用简介-Travis CI 只支持 Github,提供的是持续集成服务 配置项目的.travis.yml文件
- 使用纯css做一个播放器
- AWS认证攻略 – E哥的AWS Solution Architecture Associate 认证攻略