From f637a1eb67ed906b936ef70c0c1d8572edfe5bd7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 8 Sep 2010 00:23:55 -0500 Subject: Move news model to an appropriate place Never would have guessed it should actually be in news/models.py. Signed-off-by: Dan McGee --- main/models.py | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'main/models.py') diff --git a/main/models.py b/main/models.py index f6777f97..d357ef14 100644 --- a/main/models.py +++ b/main/models.py @@ -56,23 +56,6 @@ class Meta: db_table = 'donors' ordering = ['name'] -class News(models.Model): - id = models.AutoField(primary_key=True) - author = models.ForeignKey(User, related_name='news_author') - postdate = models.DateField(auto_now_add=True) - title = models.CharField(max_length=255) - content = models.TextField() - def __unicode__(self): - return self.title - class Meta: - db_table = 'news' - verbose_name_plural = 'news' - get_latest_by = 'postdate' - ordering = ['-postdate', '-id'] - - def get_absolute_url(self): - return '/news/%i/' % self.id - class Arch(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=255, unique=True) -- cgit v1.2.3-54-g00ecf