django使用forms表单报错报错 '*Form' object has no attribute 'cleaned_data


'*Form' object has no attribute 'cleaned_data'

django进行forms开发时报错
'LoginForm' object has no attribute 'cleaned_data'

但是实际上这个方法是存在的,后来发现.is_valid()方法的括号给遗漏掉了,后来加上就好了
if form.is_valid():
cd = form.cleaned_data

参考:https://www.iteye.com/blog/msq-1714831


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM