Re: __str__ question

2006-09-14 Thread Ivan Sagalaev
Patrick J. Anderson wrote: > class ExchangeRate(models.Model): > company = ForeignKey(Company) > source = ForeignKey(Currency, related_name = 'source') > destination = ForeignKey(Currency, related_name = 'destination') > rate = FloatField(max_digits = 10, decimal_places = 2) >

__str__ question

2006-09-14 Thread Patrick J. Anderson
I'm not totally clear, perhaps it's a Python and not Django-specific question, but in my e-commerce app model, I have Currency and ExchangeRate classes: class Currency(models.Model): name = models.CharField(maxlength = 50) code = models.CharField(maxlength = 3) class Meta: