Re: Django App build - the right process?

2009-02-24 Thread Allfonso
Thanks guys, Signals I think is beyond me for the time being but Mark I think I see what you're saying... you mean define an 'adjust_price' method outside of save and call that when necessary? Cleaning up the code would help me get through the rest of it! The last save method is indeed a compli

Re: Django App build - the right process?

2009-02-24 Thread Mark Jones
The first 2 saves are overly complex: def save(self): if self.unit_price and not self.price_discount == '0': adjust = float(self.price_discount / 100.0) val_result = str(adjust) discount = Decimal(self.unit_price - (Decimal(val_result) * self.unit_price)) self.product_

Django App build - the right process?

2009-02-24 Thread Alfonso
I've been putting together a Product Database and Customer Order application that requires a lot of interim calculations, things like tax, customer discounts etc. Due to my limited knowledge of django/ python I have been basically performing these calculations in a custom save function of the app

Re: Django App build - the right process?

2009-02-24 Thread LaundroMat
On Feb 24, 3:25 pm, Alfonso wrote: > I've been putting together a Product Database and Customer Order > application that requires a lot of interim calculations, things like > tax, customer discounts etc.  Due to my limited knowledge of django/ > python I have been basically performing these calcu