Mercurial > public > bravenewsurf
comparison 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 |
comparison
equal
deleted
inserted
replaced
13:40d86ae48db1 | 14:2de51cc51d3a |
---|---|
1 from django.db import models | |
2 | |
3 # Create your models here. | |
4 class News(models.Model): | |
5 """ | |
6 This model represents all the info we store about each news entry. | |
7 | |
8 """ | |
9 title = models.CharField(max_length=128) | |
10 date = models.DateTimeField() | |
11 content = models.TextField() | |
12 | |
13 # User field? | |
14 | |
15 | |
16 | |
17 class Meta: | |
18 verbose_name_plural="News" | |
19 | |
20 def __unicode__(self): | |
21 return self.title |