I kinda know what the problem is here but don't know how to fix it.

I have this model class Comment(models.Model):

    comment_post = models.ForeignKey('Post')
    comment_date = models.DateTimeField('Date comment made')
    comment_body = models.TextField()
    comment_spam = models.BooleanField(default=False)
    comment_author = models.CharField(max_length=5000)

    def __unicode__(self):
        return self.comment_post

and when i true to add a comment using the admin pages i get :

coercing to Unicode: need string or buffer, Post found

presuambly this is something to do with  return self.comment_post but
what should i do to fix it

thanks
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to