Forest,
Here are my models
class Style(models.Model):
name = models.CharField(maxlength=200, core=True)
image = models.ForeignKey(Photo)
collection = models.ForeignKey(Collection,
edit_inline=models.TABULAR, num_in_admin=1,
num_extra_on_change=3)
sandp = models.ManyToManyField(Choice)
class Choice(models.Model):
choice = models.ForeignKey(Collection,
edit_inline=models.TABULAR,
num_in_admin=5)
size = models.ForeignKey(Size, core=True)
price = models.ForeignKey(Price, core=True)
orderdisplay = models.IntegerField()
class Price(models.Model):
name = models.DecimalField(max_digits=6,
decimal_places=2)
def __str__(self,):
return str(self.name)
///////////////////////////////////////
On Dec 16, 11:56 am, Forest Bond <for... alittletooquiet.net> wrote:
> Hi,
>
> On Sun, Dec 16, 2007 at 08:37:08AM -0800, Greg wrote:
> > I've tried the following:
>
> > for s in s2:
> > s.price *= s.price * .9
>
> > However, I still get the following error:
>
> > TypeError at /plush/chandra/antara/108/multi/
> > unsupported operand type(s) for *: 'Price' and
'float'
>
> Can you post your models, please?
>
> I take it price is a ForeignKey...
>
> -Forest
> --
> Forest Bondhttp://www.alittletooq
uiet.net
>
> signature.asc
> 1KDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|