Django tut Blog model 1


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



Copy this code and paste it in your HTML
  1. class Post(models.Model):
  2. entry_title = models.CharField(max_length=200)
  3. entry_content = models.TextField(max_length=5000)
  4. entry_category = models.ForeignKey(Category)
  5. def __unicode__(self):
  6. return self.entry_title

URL: http://affix.me

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.