Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Model definition
- class Blog(models.Model):
- name = models.CharField(max_length=100)
- tagline = models.TextField()
- def __unicode__(self):
- return self.name
- from mysite.blog.models import Blog
- b = Blog(name='Beatles Blog', tagline='All the latest Beatles news.')
- b.save()
Add Comment
Please, Sign In to add comment