From: Magnus Hagander Date: Wed, 17 Jun 2009 17:31:14 +0000 (+0200) Subject: Use unicode instead of ascii in generating strings, so the admin X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=35f19ec2bf680f95fc49162ef6bb6fee772ec05f;p=hamn.git Use unicode instead of ascii in generating strings, so the admin interface doesn't barf. --- diff --git a/hamnadmin/register/models.py b/hamnadmin/register/models.py index 0d7eb61..26f4bc0 100644 --- a/hamnadmin/register/models.py +++ b/hamnadmin/register/models.py @@ -6,7 +6,7 @@ class Team(models.Model): teamurl = models.CharField(max_length=255, blank=False) name = models.CharField(max_length=255, blank=False) - def __str__(self): + def __unicode__(self): return "%s (%s)" % (self.name, self.teamurl) class Meta: @@ -25,7 +25,7 @@ class Blog(models.Model): authorfilter = models.CharField(max_length=255,default='',blank=True) team = models.ForeignKey(Team,db_column='team', blank=True, null=True) - def __str__(self): + def __unicode__(self): return "%s (%s)" % (self.name, self.feedurl) @property @@ -50,7 +50,7 @@ class Post(models.Model): guidisperma = models.BooleanField() hidden = models.BooleanField() - def __str__(self): + def __unicode__(self): return self.title class Meta: @@ -71,7 +71,7 @@ class AuditEntry(models.Model): self.user = userid self.logtxt = txt - def __str__(self): + def __unicode__(self): return "%s (%s): %s" % (self.logtime, self.user, self.logtxt) class Meta: