comparison gpp/news/models.py @ 226:405468b8e3b9

For #51; change verbose_name & verbose_name_plural so that the Haystack model search form has reasonable labels.
author Brian Neal <bgneal@gmail.com>
date Thu, 10 Jun 2010 03:31:57 +0000
parents 71fd8454688b
children 1246a4f1ab4f
comparison
equal deleted inserted replaced
225:7fdfc9b3c71a 226:405468b8e3b9
67 def __unicode__(self): 67 def __unicode__(self):
68 return self.title 68 return self.title
69 69
70 class Meta: 70 class Meta:
71 ordering = ('-date_submitted', ) 71 ordering = ('-date_submitted', )
72 verbose_name_plural = 'Stories' 72 verbose_name = 'news story'
73 verbose_name_plural = 'news stories'
73 74
74 def can_comment_on(self): 75 def can_comment_on(self):
75 now = datetime.datetime.now() 76 now = datetime.datetime.now()
76 delta = now - self.date_submitted 77 delta = now - self.date_submitted
77 return self.allow_comments and delta.days < 30 78 return self.allow_comments and delta.days < 30