I am getting this error in the django 404 exception page: "unsupported operand type(s) for *: 'NoneType' and 'NoneType'"
What does your urls.py file look like. If you are getting 404 then it
may not be finding your view.
--
Joel Goldstick
Did I not understand your question, I am new at this.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
"unsupported operand type(s) for *: 'NoneType' and 'NoneType'"
--
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.
As for the error, I don't know how you refactored your models code but
obviously from the error message, you are not passing in ints. You can
try to debug the code by printing capital and tax_rate so you can see
what values are being passed into the function.
>> 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...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
--
Sent from my mobile device