Mercurial > public > sg101
comparison gpp/forums/models.py @ 81:e356ea79a7a2
More work on forums. Committing what we got so far.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 23 Aug 2009 00:14:52 +0000 |
parents | 374b24dd2f9a |
children | bc3978f023c2 |
comparison
equal
deleted
inserted
replaced
80:a4fdc4d23b9e | 81:e356ea79a7a2 |
---|---|
39 class Meta: | 39 class Meta: |
40 ordering = ('position', ) | 40 ordering = ('position', ) |
41 | 41 |
42 def __unicode__(self): | 42 def __unicode__(self): |
43 return self.name | 43 return self.name |
44 | |
45 @models.permalink | |
46 def get_absolute_url(self): | |
47 return ('forums-forum_index', [self.slug]) | |
44 | 48 |
45 def topic_count_update(self): | 49 def topic_count_update(self): |
46 """Call to notify the forum that its topic count has been updated.""" | 50 """Call to notify the forum that its topic count has been updated.""" |
47 self.topic_count = Topic.objects.filter(forum=self).count() | 51 self.topic_count = Topic.objects.filter(forum=self).count() |
48 | 52 |