Mercurial > public > sg101
comparison gpp/news/models.py @ 49:e66e718e1e1e
For reasons I don't get, the prod server doesn't like auth.models.User.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 21 Jun 2009 21:41:41 +0000 |
parents | dbd703f7d63a |
children | e249b5f9d180 |
comparison
equal
deleted
inserted
replaced
48:31cb8d55e3a1 | 49:e66e718e1e1e |
---|---|
2 Models for the news application. | 2 Models for the news application. |
3 """ | 3 """ |
4 | 4 |
5 import datetime | 5 import datetime |
6 from django.db import models | 6 from django.db import models |
7 from django.contrib import auth | 7 from django.contrib.auth.models import User |
8 from tagging.fields import TagField | 8 from tagging.fields import TagField |
9 | 9 |
10 | 10 |
11 class Category(models.Model): | 11 class Category(models.Model): |
12 """News stories belong to categories""" | 12 """News stories belong to categories""" |
25 | 25 |
26 | 26 |
27 class PendingStory(models.Model): | 27 class PendingStory(models.Model): |
28 """Stories submitted by users are held pending admin approval""" | 28 """Stories submitted by users are held pending admin approval""" |
29 title = models.CharField(max_length=255) | 29 title = models.CharField(max_length=255) |
30 submitter = models.ForeignKey(auth.models.User) | 30 submitter = models.ForeignKey(User) |
31 category = models.ForeignKey(Category) | 31 category = models.ForeignKey(Category) |
32 short_text = models.TextField() | 32 short_text = models.TextField() |
33 long_text = models.TextField(blank=True) | 33 long_text = models.TextField(blank=True) |
34 date_submitted = models.DateTimeField(auto_now_add=True, db_index=True) | 34 date_submitted = models.DateTimeField(auto_now_add=True, db_index=True) |
35 allow_comments = models.BooleanField(default=True) | 35 allow_comments = models.BooleanField(default=True) |
59 | 59 |
60 | 60 |
61 class Story(models.Model): | 61 class Story(models.Model): |
62 """Model for news stories""" | 62 """Model for news stories""" |
63 title = models.CharField(max_length=255) | 63 title = models.CharField(max_length=255) |
64 submitter = models.ForeignKey(auth.models.User) | 64 submitter = models.ForeignKey(User) |
65 category = models.ForeignKey(Category) | 65 category = models.ForeignKey(Category) |
66 short_text = models.TextField() | 66 short_text = models.TextField() |
67 long_text = models.TextField(blank=True) | 67 long_text = models.TextField(blank=True) |
68 allow_comments = models.BooleanField(default=True) | 68 allow_comments = models.BooleanField(default=True) |
69 date_published = models.DateTimeField(db_index=True) | 69 date_published = models.DateTimeField(db_index=True) |