muntu
muntu

Reputation: 2485

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  
{}  
Form.non_field_errors()  
[]  

Upvotes: 0

Views: 1405

Answers (1)

crivateos
crivateos

Reputation: 925

Try this

form = YourForm(data={dict_with_data})

Upvotes: 2

Related Questions