... I suppose this would be the approach for extending a base model.
My question is ... does it really matter which approach to take? Does
one approach have advanteages or pitfalls?
>>>>>>>>>>>>>>>>>>>>>>.
class BaseCost(models.Model):
markettingevent = models.ForeignKey(Event)
units = models.IntegerField()
class FixedCost(baseCost):
rate = models.ForeignKey(Rate)
class StructuredCost(baseCost):
cost_item = models.ForeignKey(CostItem, verbose_name="Item")
unit_amount = models.DecimalField("Price Per Unit", max_digits=5,
decimal_places=2)
class OtherCost(baseCost):
description = models.CharField("Name", max_length=30)
unit_amount = models.DecimalField("Price Per Unit", max_digits=5,
decimal_places=2)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.