Editting ForeignKey from "child" table

Posted by profuel on Stack Overflow See other posts from Stack Overflow or by profuel
Published on 2010-04-14T10:58:31Z Indexed on 2010/04/14 11:03 UTC
Read the original article Hit count: 316

I'm programming on py with django. I have models:

class Product(mymodels.Base):
    title = models.CharField()
    price = models.ForeignKey(Price)
    promoPrice = models.ForeignKey(Price, related_name="promo_price")

class Price(mymodels.Base): value = models.DecimalField(max_digits=10, decimal_places=3) taxValue = models.DecimalField("Tax Value", max_digits=10, decimal_places=3) valueWithTax = models.DecimalField("Value with Tax", max_digits=10, decimal_places=3)

I want to see INPUTs for both prices when editing product, but cannot find any possibility to do that. inlines = [...] works only from Price to Product, which is stupid in this case.

Thanx for adnvance.

© Stack Overflow or respective owner

Related posts about python

Related posts about django