I have a database of articles, where I want each article to have several prices for different price groups. So I have the following:
class PriceGroup (models.Model): description = models.CharField(maxlength=255) code = models.IntegerField(unique=1) class Admin: pass def __str__(self): return self.description class Article(models.Model): description = models.CharField(maxlength=255) catnum = models.CharField(maxlength=64, primary_key=1) class Admin: pass def __str__(self): return self.description class ArticlePrice (models.Model): price = models.FloatField(null=1, blank=1, max_digits=16, decimal_places=8) group = models.ForeignKey(PriceGroup) article = models.ForeignKey(Article) def __str__(self): return self.price Now how do I make it so that for each article the admin shows me N price entry fields (one for each price group)? Also, what's a good field type for money? (PgSql suggests using 'numeric') -- Jordan --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---