开发者

How to check why form is not valid

I have some troublesome form in my django app. Problem is that it doesn't validate. How can I check what is causing the problem ? I've tried the following :

form.data = {dictionary_with_data}  
form.is_valid()  
False  
form._errors  
{}  
form.errors  
开发者_如何学Python{}  
Form.non_field_errors()  
[]  


Try this

form = YourForm(data={dict_with_data})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜