Re: Unicode Type Error when adding M2M field

2007-09-05 Thread wolfds
wolfds schrieb: > Your class Alert should have defined a method __unicode__() to return > a Unicode represantation. If so, you can use > > def __unicode__(self): > return smart_unicode(self.advert) > > in the class Rank_alert. sorry for typos - again: Your class Advert should have defined

Re: Unicode Type Error when adding M2M field

2007-09-05 Thread wolfds
Your class Alert should have defined a method __unicode__() to return a Unicode represantation. If so, you can use def __unicode__(self): return smart_unicode(self.advert) in the class Rank_alert. --~--~-~--~~~---~--~~ You received this message because you

Unicode Type Error when adding M2M field

2007-09-05 Thread Merric Mercer
I have the following model:- class Rank_Advert(models.Model):     advert = models.ForeignKey(Advert)     brand = models.ForeignKey(Brand,verbose_name="brand_owner")     rank= models.IntegerField(default=1,blank=True)     def __unicode__(self):     return self.advert     class Admin: