Your FormClass expects all 3 fields to be optional (*required=False*). But 
your code in view always expects them to have integer values. And you end 
up multiplying values from two blank fields! Either you provide some 
default value to the fields or rewrite view to use *form.cleaned_data.get*with 
a default value as 2nd argument to it.

On Monday, March 19, 2012 9:11:27 PM UTC+5:30, bolivar4 wrote:

>  
>
> "unsupported operand type(s) for *: 'NoneType' and 'NoneType'"
>
>  
> class FinanceTable(forms.Form):
>        capital = forms.IntegerField(required=False)
>        tax_rate = forms.DecimalField(required=False)
>        useage = forms.IntegerField(required=False)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/CFfpFTLoPSMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to