Mercurial > public > sg101
comparison news/models.py @ 999:8386a8ebcbc7
WIP News v2.0 admin changes.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 21 Nov 2015 14:53:29 -0600 |
parents | e2c3d7ecfa30 |
children | abd4c02aefdb |
comparison
equal
deleted
inserted
replaced
998:e2c3d7ecfa30 | 999:8386a8ebcbc7 |
---|---|
34 class StoryBase(models.Model): | 34 class StoryBase(models.Model): |
35 """Abstract model to collect common fields.""" | 35 """Abstract model to collect common fields.""" |
36 title = models.CharField(max_length=255) | 36 title = models.CharField(max_length=255) |
37 submitter = models.ForeignKey(User) | 37 submitter = models.ForeignKey(User) |
38 category = models.ForeignKey(Category) | 38 category = models.ForeignKey(Category) |
39 short_text = models.TextField() | 39 short_text = models.TextField(default='', blank=True) |
40 long_text = models.TextField(default='', blank=True) | 40 long_text = models.TextField(default='', blank=True) |
41 date_submitted = models.DateTimeField(db_index=True) | 41 date_submitted = models.DateTimeField(db_index=True) |
42 allow_comments = models.BooleanField(default=True) | 42 allow_comments = models.BooleanField(default=True) |
43 tags = TagField() | 43 tags = TagField() |
44 front_page_expiration = models.DateField(null=True, blank=True) | 44 front_page_expiration = models.DateField(null=True, blank=True) |