comparison news/models.py @ 987:76525f5ac2b1

Modify ssl_images to update news models.
author Brian Neal <bgneal@gmail.com>
date Wed, 28 Oct 2015 21:06:13 -0500
parents ee87ea74d46b
children 19b86e684cc2
comparison
equal deleted inserted replaced
986:26de15fb5a80 987:76525f5ac2b1
16 16
17 def __unicode__(self): 17 def __unicode__(self):
18 return self.title 18 return self.title
19 19
20 def num_stories(self): 20 def num_stories(self):
21 return News.objects.filter(category = self.pk).count() 21 return Story.objects.filter(category=self.pk).count()
22 22
23 class Meta: 23 class Meta:
24 verbose_name_plural = 'Categories' 24 verbose_name_plural = 'Categories'
25 ordering = ('title', ) 25 ordering = ('title', )
26 26