Hi, On Sun, Dec 16, 2007 at 07:59:52AM -0800, Greg wrote: > I've added that code into my view. However, now I'm getting the > following error: > > TypeError at /manu/coll/style/ > unsupported operand type(s) for *=: 'Price' and 'float' > > //////////////// > > I can't do a int(s.price), because then I get a 'Can't assign to > function call' error.
How about: for s in s2: s.price = s.price * 0.9 Haven't tried it, but I think that will work. Maybe django's FloatField and DecimalField should support *=, but it appears that they currently don't ... ? -Forest -- Forest Bond http://www.alittletooquiet.net
signature.asc
Description: Digital signature