Re: if statement in django

2014-04-06 Thread Keith Edmiston
It appears that you might have an indentation problem within the else: statement of calc_total_price function. On Sun, Apr 6, 2014 at 12:57 AM, Anthony Smith wrote: > thanks now but getting the following error > > File "/home/tony/Documents/stockapp/stock/models.py" in save > 128. sel

Re: if statement in django

2014-04-05 Thread Anthony Smith
thanks now but getting the following error File "/home/tony/Documents/stockapp/stock/models.py" in save 128. self.total_price = self.calc_total_price() File "/home/tony/Documents/stockapp/stock/models.py" in calc_total_price 124. amount_price = (self.estimated_total_weight * self.sale

Re: if statement in django

2014-04-05 Thread Jay Lozier
On 04/05/2014 11:08 PM, Anthony Smith wrote: Hi I have a small project and I have been unable to get the following statement to work. Any help would great.User inputs can either self_sale_head which is a $ value,if a $ value is not add a self.estimated_weight_hd is used to get the