I found the error.
coef is taken from another database
The two fields are the same but when I record value in the new database is
not recorded properly.
this is the solution but no sense.
The fields in both databases are identical.
I just copy from one database and paste the value in the other
Hard to help with this small code. Could you please send me all function or
class from your view.py ?
12 трав. 2016 22:37 "Григор Колев" пише:
> #models.py
> coef = models.DecimalField(max_digits=5, decimal_places=4, default=0.0100,
> verbose_name='Коефицент')
>
>
> #view.py
> item['coef'] == 0.0
#models.py
coef = models.DecimalField(max_digits=5, decimal_places=4, default=0.0100,
verbose_name='Коефицент')
#view.py
item['coef'] == 0.01
print item['coef'] # return 0.0
if item['total'] < 0:
item['sum'] = item['total'] * ( item['coef'] * -1)
On Python it is work.
I try to make coke Flo
3 matches
Mail list logo