Django tut Blog model 3


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. class Comment(models.Model):
  2. comment_author = models.CharField(max_length=200)
  3. author_email = models.CharField(max_length=200)
  4. author_web = models.CharField(max_length=200)
  5. post_id = models.ForeignKey(Post)
  6. comment_content = models.TextField(max_length=500)
  7. def __unicode__(self):
  8. return self.comment_author

URL: http://affix.me

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.