Mercurial > public > bravenewsurf
annotate bns_website/news/models.py @ 14:2de51cc51d3a
My first stab at the news app. The template is a little dull, but it's a start.
author | Bob Mourlam <bob.mourlam@gmail.com> |
---|---|
date | Sun, 30 Oct 2011 21:33:45 -0500 |
parents | |
children | 687af3cb0525 |
rev | line source |
---|---|
bob@14 | 1 from django.db import models |
bob@14 | 2 |
bob@14 | 3 # Create your models here. |
bob@14 | 4 class News(models.Model): |
bob@14 | 5 """ |
bob@14 | 6 This model represents all the info we store about each news entry. |
bob@14 | 7 |
bob@14 | 8 """ |
bob@14 | 9 title = models.CharField(max_length=128) |
bob@14 | 10 date = models.DateTimeField() |
bob@14 | 11 content = models.TextField() |
bob@14 | 12 |
bob@14 | 13 # User field? |
bob@14 | 14 |
bob@14 | 15 |
bob@14 | 16 |
bob@14 | 17 class Meta: |
bob@14 | 18 verbose_name_plural="News" |
bob@14 | 19 |
bob@14 | 20 def __unicode__(self): |
bob@14 | 21 return self.title |