Moderators appear as "Moderator Object" in admin

0 ogledov
Preskoči na prvo neprebrano sporočilo

captainmish

neprebran,
22. apr. 2009, 09:48:1622. 4. 09
do snapboard-discuss
Hi
I have found that when adding a moderator, they show up as "moderator
object" in the admin gui. This just needed a new __unicode__ function
in the Moderator model, the attached svn diff [1] fixes it for me. It
uses username rather than first_name last_name as these may not be
present.
Thanks for a useful app!
Cheers,

[1]
Index: snapboard/models.py
===================================================================
--- snapboard/models.py (revision 214)
+++ snapboard/models.py (working copy)
@@ -233,6 +233,8 @@
verbose_name = _('moderator')
verbose_name_plural = _('moderators')

+ def __unicode__(self):
+ return u'%s' % (self.user.username,)

class Thread(models.Model):
subject = models.CharField(max_length=160, verbose_name=_
('subject'))
Odgovori vsem
Odgovori avtorju
Posreduj
0 novih sporočil